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 113784 Details for
Bug 246406
[performance][api] Timeout waiting when loading SystemPreferencesManager$ModelChangeListener during startup
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
My version of the patch
Bug246406_asyncMsgFileLoad.diff.txt (text/plain), 50.35 KB, created by
Martin Oberhuber
on 2008-09-29 14:34:06 EDT
(
hide
)
Description:
My version of the patch
Filename:
MIME Type:
Creator:
Martin Oberhuber
Created:
2008-09-29 14:34:06 EDT
Size:
50.35 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rse.sdk-feature >Index: feature.xml >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/features/org.eclipse.rse.sdk-feature/feature.xml,v >retrieving revision 1.31 >diff -u -r1.31 feature.xml >--- feature.xml 23 Sep 2008 15:28:26 -0000 1.31 >+++ feature.xml 29 Sep 2008 18:26:01 -0000 >@@ -2,7 +2,7 @@ > <feature > id="org.eclipse.rse.sdk" > label="%featureName" >- version="3.0.100.qualifier" >+ version="3.1.0.qualifier" > provider-name="%providerName" > image="eclipse_update_120.jpg"> > >#P org.eclipse.rse-feature >Index: feature.xml >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/features/org.eclipse.rse-feature/feature.xml,v >retrieving revision 1.12 >diff -u -r1.12 feature.xml >--- feature.xml 23 Sep 2008 15:28:29 -0000 1.12 >+++ feature.xml 29 Sep 2008 18:26:03 -0000 >@@ -2,7 +2,7 @@ > <feature > id="org.eclipse.rse" > label="%featureName" >- version="3.0.100.qualifier" >+ version="3.1.0.qualifier" > provider-name="%providerName" > plugin="org.eclipse.rse" > image="eclipse_update_120.jpg"> >#P org.eclipse.rse.services >Index: META-INF/MANIFEST.MF >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.services/META-INF/MANIFEST.MF,v >retrieving revision 1.18 >diff -u -r1.18 MANIFEST.MF >--- META-INF/MANIFEST.MF 23 Sep 2008 15:28:42 -0000 1.18 >+++ META-INF/MANIFEST.MF 29 Sep 2008 18:26:04 -0000 >@@ -2,7 +2,7 @@ > Bundle-ManifestVersion: 2 > Bundle-Name: %pluginName > Bundle-SymbolicName: org.eclipse.rse.services;singleton:=true >-Bundle-Version: 3.0.100.qualifier >+Bundle-Version: 3.1.0.qualifier > Bundle-Activator: org.eclipse.rse.internal.services.Activator > Bundle-Vendor: %providerName > Bundle-Localization: plugin >Index: clientserver/org/eclipse/rse/services/clientserver/messages/SystemMessageFile.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.services/clientserver/org/eclipse/rse/services/clientserver/messages/SystemMessageFile.java,v >retrieving revision 1.5 >diff -u -r1.5 SystemMessageFile.java >--- clientserver/org/eclipse/rse/services/clientserver/messages/SystemMessageFile.java 5 Jun 2007 10:37:08 -0000 1.5 >+++ clientserver/org/eclipse/rse/services/clientserver/messages/SystemMessageFile.java 29 Sep 2008 18:26:04 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2002, 2007 IBM Corporation and others. >+ * Copyright (c) 2002, 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 >@@ -7,12 +7,13 @@ > * > * Initial Contributors: > * The following IBM employees contributed to the Remote System Explorer >- * component that contains this file: David McKnight, Kushal Munir, >- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, >+ * component that contains this file: David McKnight, Kushal Munir, >+ * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson, > * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. >- * >+ * > * Contributors: >- * {Name} (company) - description of contribution. >+ * David McKnight (IBM) [246406] [performance] Timeout waiting when loading SystemPreferencesManager$ModelChangeListener during startup >+ * Martin Oberhuber (Wind River) - [246406] Thread-safe support for Lazy Loading > *******************************************************************************/ > > package org.eclipse.rse.services.clientserver.messages; >@@ -24,8 +25,11 @@ > import java.io.PrintWriter; > import java.net.URI; > import java.net.URISyntaxException; >+import java.net.URL; >+import java.util.Collections; > import java.util.Hashtable; > import java.util.LinkedList; >+import java.util.List; > import java.util.Vector; > > import javax.xml.parsers.DocumentBuilder; >@@ -44,17 +48,20 @@ > > > /** >- * Use this class to open, and parse, a RSE-style message file. >+ * Use this class to open, and parse, a RSE-style message file. > */ > public class SystemMessageFile implements ErrorHandler > { > >- >- private static final LinkedList msgfList=new LinkedList(); >+ /** >+ * List<MessageFileInfo> of loaded message files to avoid double loading. >+ * Must be synchronized since queried from multiple Threads. >+ */ >+ private static final List msgfList = Collections.synchronizedList(new LinkedList()); > private MessageFileInfo msgFile; > private String defaultMsgFileLocation; > private InputStream dtdInputStream; >- // the following is an attempt to improve response time, and reduce memory requirements, by >+ // the following is an attempt to improve response time, and reduce memory requirements, by > // caching SystemMessage objects for previously issued messages. Phil > private Hashtable messages = new Hashtable(); > // XML TAG AND ELEMENT NAMES... >@@ -68,19 +75,24 @@ > private static final String XML_ATTR_ID = "ID"; //$NON-NLS-1$ > private static final String XML_ATTR_INDICATOR = "Indicator"; //$NON-NLS-1$ > private static final String XML_ATTR_NAME = "Name"; //$NON-NLS-1$ >- >- >- >- /** >- * Inner class >- */ >- private class MessageFileInfo >- { >- private String filename=null; >- private String shortName=null; >- private Document xmlDocument=null; >- >- public MessageFileInfo(String ucFileName, String lcFileName, Document doc) >+ >+ // when using lazy loading, this is the thread that loads the message file >+ private final Thread fLoadThread; >+ >+ // indicates whether the lazy load thread is done >+ private boolean fLoadThreadFinished = false; >+ >+ /** >+ * File info node in msgfList to avoid duplicate loading. >+ * Thread-safe since immutable. >+ */ >+ private static class MessageFileInfo >+ { >+ private final String filename; >+ private final String shortName; >+ private final Document xmlDocument; >+ >+ public MessageFileInfo(String ucFileName, String lcFileName, Document doc) > { > filename=ucFileName; > int idx=lcFileName.lastIndexOf('\\'); >@@ -88,61 +100,159 @@ > idx = lcFileName.lastIndexOf('/'); > if (idx >= 0) > shortName = lcFileName.substring(idx+1); >- else >+ else > shortName = lcFileName; > xmlDocument=doc; > } >- >- public String getMessageFullFileName() >+ >+ public String getMessageFullFileName() > { > return filename; > } >- public String getMessageShortFileName() >+ public String getMessageShortFileName() > { > return shortName; > } >- >- public Document getXMLDocument() >+ >+ public Document getXMLDocument() > { > return xmlDocument; > } > } > > /** >+ * Thread for loading a message file asynchronously. >+ * >+ * Opens Streams, creates an internal message file info object holding the >+ * DTD, and closes Streams. In case of error, the message file info object >+ * is not set (remains <code>null</code>). >+ * >+ * As a result, >+ * <ul> >+ * <li>The {@link #msgFile} variable is set to the loaded message file info >+ * node if successful.</li> >+ * <li>The {@link #fLoadThreadFinished} is guaranteed to be set >+ * <code>true</code>.</li> >+ * <li>All waiting Threads are notified.</li> >+ * </ul> >+ */ >+ private class LoadThread extends Thread { >+ private URL _messageFileURL; >+ private URL _dtdURL; >+ private String _messageFileName; >+ >+ public LoadThread(String messageFileName, URL messageFileURL, URL dtdURL) { >+ _messageFileName = messageFileName; >+ _messageFileURL = messageFileURL; >+ _dtdURL = dtdURL; >+ } >+ >+ public void run() { >+ InputStream messageFile = null; >+ InputStream dtdFile = null; >+ try { >+ messageFile = _messageFileURL.openStream(); >+ dtdFile = _dtdURL.openStream(); >+ SystemMessageFile realFile = new SystemMessageFile(_messageFileName, messageFile, dtdFile); >+ msgFile = realFile.msgFile; >+ } catch (IOException e) { >+ // problem loading message file -- msgFile is not set. >+ } finally { >+ // Notify that work is finished before closing Streams - >+ // Avoid not getting this set due to a RuntimeError >+ synchronized (this) { >+ fLoadThreadFinished = true; >+ notifyAll(); >+ } >+ if (messageFile != null) { >+ try { >+ safeClose(messageFile); >+ } finally { >+ if (dtdFile != null) >+ safeClose(dtdFile); >+ } >+ } >+ } >+ } >+ >+ private void safeClose(InputStream s) { >+ try { >+ s.close(); >+ } catch (IOException e) { >+ /* ignore */ >+ } >+ } >+ } >+ >+ >+ >+ /** >+ * Constructor to use for lazy loading of a system message file. >+ * >+ * The difference between the {@link #SystemMessageFile(String,InputStream,InputStream)} >+ * constructor and this one is that the former loads the message file synchronously while >+ * this one loads the message file in a thread. The message file and DTD URLs are passed >+ * in here so that the opening of their input streams can be deferred until the time when >+ * the worker thread is started and able to load the message file. >+ * >+ * @param messageFileName the name of the system message file >+ * @param msgFileURL the URL to the message file >+ * @param dtdURL the URL to the DTD for the message file >+ * >+ * @since 3.1 >+ */ >+ public SystemMessageFile(final String messageFileName, final URL msgFileURL, final URL dtdURL) >+ { >+ // have we already loaded this message file? >+ msgFile = getFromCache(messageFileName); >+ if (msgFile == null){ >+ // will set msgFile variable and fLoadThreadFinished when done >+ fLoadThread = new LoadThread(messageFileName, msgFileURL, dtdURL); >+ fLoadThread.start(); >+ } >+ else { // there's already a cached message file for this >+ // no need to load it, just use the msgFile >+ fLoadThread = null; >+ } >+ } >+ >+ >+ /** > * Constructor >- * @param messageFileName - a key used to determine if a message file has already been loaded. >- * Usually the name of the xml file containing the message file. >+ * @param messageFileName - a key used to determine if a message file has already been loaded. >+ * Usually the name of the xml file containing the message file. > * @param messageFile the stream containing the message file. > * @param dtdStream the stream containing the dtd for this message file. > */ >- public SystemMessageFile (String messageFileName, InputStream messageFile, InputStream dtdStream) >+ public SystemMessageFile (String messageFileName, InputStream messageFile, InputStream dtdStream) > { > // have we already loaded this message file? > msgFile = getFromCache(messageFileName); >- >- // now, we haven't. Load it now. >+ >+ // now, we haven't. Load it now. > this.dtdInputStream = dtdStream; >- if (msgFile == null) >+ if (msgFile == null) > { > Document doc = loadAndParseXMLFile(messageFile); > msgFile=new MessageFileInfo(messageFileName.toUpperCase(), messageFileName, doc); > msgfList.add(msgFile); > //scanForDuplicates(); // don't keep this for production. Too expensive >- } >+ } >+ fLoadThread = null; > } > > /** > * If the named message file has already been loaded return its > * MessageFileInfo >- * @param messageFileName >+ * @param messageFileName name of the message file > * @return the MessageFileInfo for this message file > */ > protected MessageFileInfo getFromCache(String messageFileName) > { >- for (int i=0; i<msgfList.size(); i++) >+ for (int i=0; i<msgfList.size(); i++) > { > MessageFileInfo msgf=(MessageFileInfo)msgfList.get(i); >- if (msgf.getMessageFullFileName().equals(messageFileName.toUpperCase())) >+ if (msgf.getMessageFullFileName().equals(messageFileName.toUpperCase())) > { > return msgf; > } >@@ -150,33 +260,57 @@ > return null; > } > >+ /** >+ * Waits until the message file is loaded or canceled due to error >+ */ >+ private void waitUntilLoaded() { >+ // fastpath: returns immediately if constructed synchronously >+ if (fLoadThread != null) { >+ // asynchronous load pending: wait until loaded or load canceled >+ synchronized (fLoadThread) { >+ while (!fLoadThreadFinished) { >+ try { >+ fLoadThread.wait(); >+ } catch (InterruptedException e) { >+ // ignore since the Thread is guaranteed to finish >+ } >+ } >+ } >+ } >+ } > > /** >- * Use this method to retrieve a message from the message file. >- * @param msgId - the ID of the message to retrieve. This is the concatenation of the >- * message's component abbreviation, subcomponent abbreviation, and message ID as declared >- * in the message xml file. >- * @return SystemMessage object >+ * Use this method to retrieve a message from the message file. If this >+ * SystemMessageFile loaded from a thread, then the method will wait until >+ * the loading is complete before returning the message. >+ * >+ * @param msgId - the ID of the message to retrieve. This is the >+ * concatenation of the message's component abbreviation, >+ * subcomponent abbreviation, and message ID as declared in the >+ * message XML file. >+ * @return SystemMessage the SysteMessage object that corresponds to the >+ * message ID > */ >- public SystemMessage getMessage(String msgId) >+ public SystemMessage getMessage(String msgId) > { >+ waitUntilLoaded(); > boolean echoErrorsToStandardOut = true; > // DY Defect 42605 >- if (msgFile.getXMLDocument() == null) >+ if (msgFile == null || msgFile.getXMLDocument() == null) > { >- issueErrorMessage("No XML document for message file", echoErrorsToStandardOut); //$NON-NLS-1$ >+ issueErrorMessage("No XML document for message file", echoErrorsToStandardOut); > return null; > } >- >+ > // caching added by Phil to increase performance, and not to leave a trail of SystemMessage objects for > // the garbage collector. Hopefully, the extra memory for the cache does not defeat these benefits. >- SystemMessage msg = (SystemMessage)messages.get(msgFile.getMessageShortFileName()+":"+msgId); //$NON-NLS-1$ >+ SystemMessage msg = (SystemMessage) messages.get(msgId); > if (msg != null) > { > //System.out.println("Reusing msg " + msgId); > return msg; > } >- >+ > // I guess the following line of code implies we only support a single component per message file... phil. > // Code tweaked by Phil. > //String componentAbbr=msgFile.getXMLDocument().getElementsByTagName("Component").item(0).getAttributes().getNamedItem("Abbr").getFirstChild().getNodeValue(); >@@ -186,27 +320,27 @@ > NodeList componentElementList = msgFile.getXMLDocument().getElementsByTagName(XML_TAG_COMPONENT); > if ((componentElementList == null) || (componentElementList.getLength() == 0)) > { >- issueErrorMessage("Unable to find any Component elements",echoErrorsToStandardOut); //$NON-NLS-1$ >+ issueErrorMessage("Unable to find any Component elements",echoErrorsToStandardOut); > return null; > } > > Element componentElement = (Element)componentElementList.item(0); > String componentAbbr = componentElement.getAttribute(XML_ATTR_ABBR); >- >+ > // get list of all Subcomponent elements... > NodeList subComponentList=msgFile.getXMLDocument().getElementsByTagName(XML_TAG_SUBCOMPONENT); >- >+ > if ((subComponentList == null) || (subComponentList.getLength() == 0)) > { >- issueErrorMessage("Unable to find any Subcomponent elements",echoErrorsToStandardOut); //$NON-NLS-1$ >+ issueErrorMessage("Unable to find any Subcomponent elements",echoErrorsToStandardOut); > return null; > } >- >+ > // fold given msg ID to uppercase >- msgId = msgId.toUpperCase(); >- >+ msgId = msgId.toUpperCase(); >+ > // search for the right component/subcomponent match >- for (int subComponentIdx=0; subComponentIdx<subComponentList.getLength(); subComponentIdx++) >+ for (int subComponentIdx=0; subComponentIdx<subComponentList.getLength(); subComponentIdx++) > { > //String subComponentAbbr=subComponentList.item(subComponentIdx).getAttributes().getNamedItem("Abbr").getFirstChild().getNodeValue(); > Element subComponentElement = (Element)subComponentList.item(subComponentIdx); >@@ -216,23 +350,23 @@ > char msgIndicator=' '; > String msgL1=""; //$NON-NLS-1$ > String msgL2=""; //$NON-NLS-1$ >- >+ > // if the message prefix matches, then try to find the message > //if (msgPrefix.toUpperCase().equals(msgId.toUpperCase().substring(0,msgPrefix.length())) && > //if (msgPrefix.equals(msgId.substring(0,msgPrefix.length())) && > if (msgId.startsWith(msgPrefix) && >- Character.isDigit(msgId.charAt(msgPrefix.length()))) >+ Character.isDigit(msgId.charAt(msgPrefix.length()))) > { > //String msgNumber=msgId.toUpperCase().substring(msgPrefix.length()); > String msgNumber=msgId.substring(msgPrefix.length()); > Element messageListNode=null; >- >+ > // search for the message list node > /* > for (Node node=subComponentList.item(subComponentIdx).getFirstChild(); > node!=null; node=node.getNextSibling()) > { >- if (node.getNodeName().equals("MessageList")) >+ if (node.getNodeName().equals("MessageList")) > { > messageListNode=node; > break; >@@ -243,17 +377,17 @@ > messageListNode = (Element)msgListNodes.item(0); > else > { >- issueWarningMessage("unable to find MessageList nodes for subComponent " + subComponentElement.getAttribute(XML_ATTR_NAME),echoErrorsToStandardOut); //$NON-NLS-1$ >+ issueWarningMessage("unable to find MessageList nodes for subComponent " + subComponentElement.getAttribute(XML_ATTR_NAME),echoErrorsToStandardOut); > continue; > } >- >+ > // search for the message node which has the right number > //for (Node node=messageListNode.getFirstChild(); > // node!=null; node=node.getNextSibling()) > NodeList msgNodes = messageListNode.getElementsByTagName(XML_TAG_MESSAGE); > if ((msgNodes==null) || (msgNodes.getLength()==0)) > { >- issueWarningMessage("unable to find Message nodes for subComponent " + subComponentElement.getAttribute(XML_ATTR_NAME),echoErrorsToStandardOut); //$NON-NLS-1$ >+ issueWarningMessage("unable to find Message nodes for subComponent " + subComponentElement.getAttribute(XML_ATTR_NAME),echoErrorsToStandardOut); > continue; > } > boolean match = false; // I added this so we stop looping when we find what we are looking for!!! Phil. >@@ -261,8 +395,8 @@ > { > Element node = (Element)msgNodes.item(msgIdx); > // if the message number matches... >- //if (node.getNodeName().equals("Message") && node.getAttributes().getNamedItem("ID").getFirstChild().getNodeValue().toUpperCase().equals(msgNumber)) >- if (node.getAttribute(XML_ATTR_ID).equals(msgNumber)) >+ //if (node.getNodeName().equals("Message") && node.getAttributes().getNamedItem("ID").getFirstChild().getNodeValue().toUpperCase().equals(msgNumber)) >+ if (node.getAttribute(XML_ATTR_ID).equals(msgNumber)) > { > match = true; > // save the indicator value >@@ -270,18 +404,18 @@ > msgIndicator=node.getAttribute(XML_ATTR_INDICATOR).toUpperCase().charAt(0); > // search for the l1 & l2 text > for (Node msgNode=node.getFirstChild(); >- msgNode!=null; msgNode=msgNode.getNextSibling()) >+ msgNode!=null; msgNode=msgNode.getNextSibling()) > { >- // get Level One text >- if (msgNode.getNodeName().equals(XML_TAG_LEVELONE)) >+ // get Level One text >+ if (msgNode.getNodeName().equals(XML_TAG_LEVELONE)) > msgL1 = getNodeText(msgNode); >- // get Level Two text >- else if (msgNode.getNodeName().equals(XML_TAG_LEVELTWO)) >+ // get Level Two text >+ else if (msgNode.getNodeName().equals(XML_TAG_LEVELTWO)) > msgL2 = getNodeText(msgNode); > } >- break; >+ break; > } >- } >+ } > if (!match) > { > /** TODO - DKM move this somewhere else since system message now needs to be eclipse independent >@@ -289,24 +423,15 @@ > */ > return null; > } >- try >- { >- msg = loadSystemMessage(componentAbbr, subComponentAbbr, msgNumber, msgIndicator, msgL1, msgL2); >- messages.put(msgFile.getMessageShortFileName()+":"+msgId, msg); // add to cache so we find it immediately next time!! //$NON-NLS-1$ >- return msg; >- } >- catch (IndicatorException e) >- { >- /** TODO - DKM move this somewhere else since system message now needs to be eclipse independent >- SystemBasePlugin.logError("MessageFile:getMessage: "+e.toString(), e); >- */ >- } >- break; >+ >+ msg = loadSystemMessage(componentAbbr, subComponentAbbr, msgNumber, msgIndicator, msgL1, msgL2); >+ messages.put(msgId, msg); // add to cache so we find it immediately next time!! >+ return msg; > } > } > return null; > } >- >+ > /** > * Override this to provide different extended SystemMessage implementation > * @param componentAbbr a three letter component name >@@ -316,15 +441,14 @@ > * @param msgL1 the first level text that describes the error > * @param msgL2 the second level text that provides details about the error and possible recovery > * @return the SystemMessage >- * @throws IndicatorException if the message type indicator is invalid. > * @see SystemMessage for message type indicator constants > */ > protected SystemMessage loadSystemMessage(String componentAbbr, String subComponentAbbr, String msgNumber, char msgIndicator, >- String msgL1, String msgL2) throws IndicatorException >+ String msgL1, String msgL2) > { > return new SystemMessage(componentAbbr, subComponentAbbr, msgNumber, msgIndicator, msgL1, msgL2); > } >- >+ > /** > * Get the level one text > */ >@@ -332,11 +456,11 @@ > { > String nodeText = ""; //$NON-NLS-1$ > for (Node textNode=msgNode.getFirstChild(); >- textNode!=null; textNode=textNode.getNextSibling()) >+ textNode!=null; textNode=textNode.getNextSibling()) > { > if ((textNode.getNodeType()==Node.TEXT_NODE) && (textNode.getNodeValue().trim().length()>0)) > nodeText += textNode.getNodeValue(); >- } >+ } > return nodeText.trim(); > } > >@@ -346,50 +470,51 @@ > * log file. > * @return true if duplicates found. > */ >- public boolean scanForDuplicates() >+ public boolean scanForDuplicates() > { > boolean echoErrorsToStandardOut = true; >- if (msgFile.getXMLDocument() == null) >- return issueErrorMessage("No XML document for message file", echoErrorsToStandardOut); //$NON-NLS-1$ >- >+ waitUntilLoaded(); >+ if (msgFile == null || msgFile.getXMLDocument() == null) >+ return issueErrorMessage("No XML document for message file", echoErrorsToStandardOut); >+ > // parse out the Abbr attr of the first Component element > NodeList componentElementList = msgFile.getXMLDocument().getElementsByTagName(XML_TAG_COMPONENT); > if ((componentElementList == null) || (componentElementList.getLength() == 0)) >- return issueErrorMessage("Unable to find any Component elements",echoErrorsToStandardOut); //$NON-NLS-1$ >+ return issueErrorMessage("Unable to find any Component elements",echoErrorsToStandardOut); > > Element componentElement = (Element)componentElementList.item(0); > String componentAbbr = componentElement.getAttribute(XML_ATTR_ABBR); >- >+ > // get list of all Subcomponent elements... > NodeList subComponentList=msgFile.getXMLDocument().getElementsByTagName(XML_TAG_SUBCOMPONENT); >- >+ > if ((subComponentList == null) || (subComponentList.getLength() == 0)) >- return issueErrorMessage("Unable to find any Subcomponent elements",echoErrorsToStandardOut); //$NON-NLS-1$ >- >+ return issueErrorMessage("Unable to find any Subcomponent elements",echoErrorsToStandardOut); >+ > // scan all subcomponents... > boolean anyDupes = false; >- for (int subComponentIdx=0; subComponentIdx<subComponentList.getLength(); subComponentIdx++) >+ for (int subComponentIdx=0; subComponentIdx<subComponentList.getLength(); subComponentIdx++) > { > Element subComponentElement = (Element)subComponentList.item(subComponentIdx); > String subComponentAbbr = subComponentElement.getAttribute(XML_ATTR_ABBR); > String msgPrefix = (componentAbbr + subComponentAbbr).toUpperCase(); > Vector msgsById = new Vector(); >- >+ > // search for the message list node >- Element messageListNode=null; >+ Element messageListNode=null; > NodeList msgListNodes = subComponentElement.getElementsByTagName(XML_TAG_MESSAGeList); > if ((msgListNodes!=null) && (msgListNodes.getLength()>0)) > messageListNode = (Element)msgListNodes.item(0); > else > { >- issueWarningMessage("unable to find MessageList nodes for subComponent " + subComponentElement.getAttribute(XML_ATTR_NAME),echoErrorsToStandardOut); //$NON-NLS-1$ >+ issueWarningMessage("unable to find MessageList nodes for subComponent " + subComponentElement.getAttribute(XML_ATTR_NAME),echoErrorsToStandardOut); > continue; > } >- >+ > NodeList msgNodes = messageListNode.getElementsByTagName(XML_TAG_MESSAGE); > if ((msgNodes==null) || (msgNodes.getLength()==0)) > { >- issueWarningMessage("unable to find Message nodes for subComponent " + subComponentElement.getAttribute(XML_ATTR_NAME),echoErrorsToStandardOut); //$NON-NLS-1$ >+ issueWarningMessage("unable to find Message nodes for subComponent " + subComponentElement.getAttribute(XML_ATTR_NAME),echoErrorsToStandardOut); > continue; > } > for (int msgIdx = 0; (msgIdx < msgNodes.getLength()); msgIdx++) >@@ -399,7 +524,7 @@ > if (msgsById.contains(msgId)) > { > anyDupes = true; >- issueWarningMessage("Warning: duplicate message " + msgId + " found", echoErrorsToStandardOut); //$NON-NLS-1$ //$NON-NLS-2$ >+ issueWarningMessage("Warning: duplicate message " + msgId + " found", echoErrorsToStandardOut); > } > else > msgsById.addElement(msgId); >@@ -414,25 +539,26 @@ > * @param fullFileName - the fully qualified name of the file to write to. Overwrites current contents. > * @return true if it went well, false if it failed for some reason, such as given a bad file name. Errors written to standard out. > */ >- public boolean printHTML(String fullFileName) >+ public boolean printHTML(String fullFileName) > { > boolean echoErrorsToStandardOut = true; >- if (msgFile.getXMLDocument() == null) >- return issueErrorMessage("No XML document for message file", echoErrorsToStandardOut); //$NON-NLS-1$ >- >+ waitUntilLoaded(); >+ if (msgFile == null || msgFile.getXMLDocument() == null) >+ return issueErrorMessage("No XML document for message file", echoErrorsToStandardOut); >+ > // parse out the Abbr attr of the first Component element > NodeList componentElementList = msgFile.getXMLDocument().getElementsByTagName(XML_TAG_COMPONENT); > if ((componentElementList == null) || (componentElementList.getLength() == 0)) >- return issueErrorMessage("Unable to find any Component elements",echoErrorsToStandardOut); //$NON-NLS-1$ >+ return issueErrorMessage("Unable to find any Component elements",echoErrorsToStandardOut); > > Element componentElement = (Element)componentElementList.item(0); > String componentAbbr = componentElement.getAttribute(XML_ATTR_ABBR); >- >+ > // get list of all Subcomponent elements... > NodeList subComponentList=msgFile.getXMLDocument().getElementsByTagName(XML_TAG_SUBCOMPONENT); >- >+ > if ((subComponentList == null) || (subComponentList.getLength() == 0)) >- return issueErrorMessage("Unable to find any Subcomponent elements",echoErrorsToStandardOut); //$NON-NLS-1$ >+ return issueErrorMessage("Unable to find any Subcomponent elements",echoErrorsToStandardOut); > > File outFile = new File(fullFileName); > PrintWriter outFileStream = null; >@@ -454,11 +580,11 @@ > } > catch (IOException exc) > { >- return issueErrorMessage("Unable to open given html file in printHTML: " + exc.getMessage(), echoErrorsToStandardOut); //$NON-NLS-1$ >+ return issueErrorMessage("Unable to open given html file in printHTML: " + exc.getMessage(), echoErrorsToStandardOut); > } > > // pre-scan all subcomponents... >- for (int subComponentIdx=0; subComponentIdx<subComponentList.getLength(); subComponentIdx++) >+ for (int subComponentIdx=0; subComponentIdx<subComponentList.getLength(); subComponentIdx++) > { > Element subComponentElement = (Element)subComponentList.item(subComponentIdx); > String subComponentAbbr = subComponentElement.getAttribute(XML_ATTR_ABBR); >@@ -473,27 +599,27 @@ > outFileStream.println("</TABLE>"); //$NON-NLS-1$ > > // scan all subcomponents... >- for (int subComponentIdx=0; subComponentIdx<subComponentList.getLength(); subComponentIdx++) >+ for (int subComponentIdx=0; subComponentIdx<subComponentList.getLength(); subComponentIdx++) > { > Element subComponentElement = (Element)subComponentList.item(subComponentIdx); > String subComponentAbbr = subComponentElement.getAttribute(XML_ATTR_ABBR); > String msgPrefix = (componentAbbr + subComponentAbbr).toUpperCase(); >- >+ > // search for the message list node >- Element messageListNode=null; >+ Element messageListNode=null; > NodeList msgListNodes = subComponentElement.getElementsByTagName(XML_TAG_MESSAGeList); > if ((msgListNodes!=null) && (msgListNodes.getLength()>0)) > messageListNode = (Element)msgListNodes.item(0); > else > { >- issueWarningMessage("unable to find MessageList nodes for subComponent " + subComponentElement.getAttribute(XML_ATTR_NAME),echoErrorsToStandardOut); //$NON-NLS-1$ >+ issueWarningMessage("unable to find MessageList nodes for subComponent " + subComponentElement.getAttribute(XML_ATTR_NAME),echoErrorsToStandardOut); > continue; > } >- >+ > NodeList msgNodes = messageListNode.getElementsByTagName(XML_TAG_MESSAGE); > if ((msgNodes==null) || (msgNodes.getLength()==0)) > { >- issueWarningMessage("unable to find Message nodes for subComponent " + subComponentElement.getAttribute(XML_ATTR_NAME),echoErrorsToStandardOut); //$NON-NLS-1$ >+ issueWarningMessage("unable to find Message nodes for subComponent " + subComponentElement.getAttribute(XML_ATTR_NAME),echoErrorsToStandardOut); > continue; > } > if (subComponentIdx > 0) >@@ -504,32 +630,32 @@ > { > Element node = (Element)msgNodes.item(msgIdx); > String msgId = msgPrefix + node.getAttribute(XML_ATTR_ID); >- char msgIndicator=node.getAttribute(XML_ATTR_INDICATOR).toUpperCase().charAt(0); >+ char msgIndicator=node.getAttribute(XML_ATTR_INDICATOR).toUpperCase().charAt(0); > String msgSeverity = "Unknown"; //$NON-NLS-1$ > if (msgIndicator == SystemMessage.ERROR) >- msgSeverity = "Error"; //$NON-NLS-1$ >+ msgSeverity = "Error"; > else if (msgIndicator == SystemMessage.WARNING) >- msgSeverity = "Warning"; //$NON-NLS-1$ >+ msgSeverity = "Warning"; > else if (msgIndicator == SystemMessage.INQUIRY) >- msgSeverity = "Question"; //$NON-NLS-1$ >+ msgSeverity = "Question"; > else if (msgIndicator == SystemMessage.INFORMATION) >- msgSeverity = "Information"; //$NON-NLS-1$ >+ msgSeverity = "Information"; > else if (msgIndicator == SystemMessage.COMPLETION) >- msgSeverity = "Completion"; //$NON-NLS-1$ >+ msgSeverity = "Completion"; > else if (msgIndicator == SystemMessage.UNEXPECTED) >- msgSeverity = "Unexpected"; //$NON-NLS-1$ >- >+ msgSeverity = "Unexpected"; >+ > String msgL1 = ""; //$NON-NLS-1$ > String msgL2 = ""; //$NON-NLS-1$ > // search for the l1 & l2 text > for (Node msgNode=node.getFirstChild(); >- msgNode!=null; msgNode=msgNode.getNextSibling()) >+ msgNode!=null; msgNode=msgNode.getNextSibling()) > { >- // get Level One text >- if (msgNode.getNodeName().equals(XML_TAG_LEVELONE)) >+ // get Level One text >+ if (msgNode.getNodeName().equals(XML_TAG_LEVELONE)) > msgL1 = getNodeText(msgNode); >- // get Level Two text >- else if (msgNode.getNodeName().equals(XML_TAG_LEVELTWO)) >+ // get Level Two text >+ else if (msgNode.getNodeName().equals(XML_TAG_LEVELTWO)) > msgL2 = getNodeText(msgNode); > } > outFileStream.println("<H3>"+msgId+"</H3>"); //$NON-NLS-1$ //$NON-NLS-2$ >@@ -543,19 +669,19 @@ > outFileStream.close(); > return true; > } >- >+ > /** > * Issue an error message > */ > private boolean issueErrorMessage(String errormsg, boolean echoStandardOut) > { >- >+ > /** TODO - DKM move this somewhere else since system message now needs to be eclipse independent > * >- SystemBasePlugin.logError("MessageFile error for msg file " + msgFile.getMessageShortFileName() + ": " + errormsg); >+ SystemBasePlugin.logError("MessageFile error for msg file " + msgFile.getMessageShortFileName() + ": " + errormsg); > **/ > if (echoStandardOut) >- System.out.println("MessageFile error for msg file " + msgFile.getMessageShortFileName() + ": " + errormsg); //$NON-NLS-1$ //$NON-NLS-2$ >+ System.out.println("MessageFile error for msg file " + msgFile.getMessageShortFileName() + ": " + errormsg); > return false; > } > /** >@@ -564,13 +690,13 @@ > private boolean issueWarningMessage(String errormsg, boolean echoStandardOut) > { > /** TODO - DKM move this somewhere else since system message now needs to be eclipse independent >- SystemBasePlugin.logError("MessageFile warning for msg file " + msgFile.getMessageShortFileName() + ": " + errormsg); >+ SystemBasePlugin.logError("MessageFile warning for msg file " + msgFile.getMessageShortFileName() + ": " + errormsg); > */ > if (echoStandardOut) >- System.out.println("MessageFile warning for msg file " + msgFile.getMessageShortFileName() + ": " + errormsg); //$NON-NLS-1$ //$NON-NLS-2$ >+ System.out.println("MessageFile warning for msg file " + msgFile.getMessageShortFileName() + ": " + errormsg); > return false; > } >- >+ > /** > * Create the XML parser > * Set its entity resolver and error handler. >@@ -591,11 +717,11 @@ > return null; > } > // DOMParser parser=new DOMParser(); >-// try >+// try > // { > // parser.setFeature( "http://xml.org/sax/features/validation", true); > // } >-// catch (SAXNotRecognizedException e) >+// catch (SAXNotRecognizedException e) > // { > // // the feature was not recognized > // /** TODO - DKM move this somewhere else since system message now needs to be eclipse independent >@@ -603,7 +729,7 @@ > // */ > // return null; > // } >-// catch (SAXNotSupportedException e) >+// catch (SAXNotSupportedException e) > // { > // // the feature requested was not supported > // /** TODO - DKM move this somewhere else since system message now needs to be eclipse independent >@@ -612,15 +738,15 @@ > // return null; > // } > parser.setEntityResolver(new EntityResolver() { >- public InputSource resolveEntity(String publicId, String systemId) throws SAXException, java.io.IOException >+ public InputSource resolveEntity(String publicId, String systemId) throws SAXException, java.io.IOException > { > /* > // This code does not work with fragments > Path path = new Path(systemId); >- if (systemId.toUpperCase().endsWith("MESSAGEFILE.DTD")) >+ if (systemId.toUpperCase().endsWith("MESSAGEFILE.DTD")) > { >- if (SystemPlugin.getBaseDefault().getDescriptor().find(path)==null) >- { >+ if (SystemPlugin.getBaseDefault().getDescriptor().find(path)==null) >+ { > path = new Path("messageFile.dtd"); > } > } >@@ -630,7 +756,7 @@ > if (dtdInputStream != null) > { > return new InputSource(dtdInputStream); >- } >+ } > else // if we have the directory containing the DTD use that > { > // yantzi:artemis6.2 changed to use URI instead of URL (URIs handle the spaces) >@@ -650,66 +776,66 @@ > { > // ignore and continue > } >- >+ > return new InputSource(systemId); > } >- } >+ } > }); > parser.setErrorHandler(this); > return parser; > } > /** >- * loadAndParseXMLFile: >+ * loadAndParseXMLFile: > * tries to load and parse the specified XML file . > * @param String messageFile: InputStream containing the XML file > */ >- private Document loadAndParseXMLFile (InputStream messageFile) >+ private Document loadAndParseXMLFile (InputStream messageFile) > { > DocumentBuilder parser = createXmlParser(); >- try >+ try > { > InputSource in = new InputSource(messageFile); >- >+ > // DKM - hack! > // If systemId is null for the InputSource, then > // the current parser hits a fatal exception. > // This hack prevents that exception so that the > // specified EntityResolver will get used. > in.setSystemId("foo"); //$NON-NLS-1$ >- Document document = parser.parse(in); >- >+ Document document = parser.parse(in); >+ > //Document document = parser.parse(messageFile); > return document; > } >- catch (SAXException e) >+ catch (SAXException e) > { > e.printStackTrace(); > // the parser was unable to parse the file. > return null; > } >- catch (IOException e) >+ catch (IOException e) > { > e.printStackTrace(); > /** TODO - DKM move this somewhere else since system message now needs to be eclipse independent >- */ >+ */ > return null; >- } >+ } > } >- >- /** >- * XML Parser-required method: XML-parser warning. >+ >+ /** >+ * XML Parser-required method: XML-parser warning. > */ >- public void warning(SAXParseException ex) >+ public void warning(SAXParseException ex) > { > /** TODO - DKM move this somewhere else since system message now needs to be eclipse independent > SystemBasePlugin.logError("SystemMessageFile: warning parsing message file: "+ex.toString()); > */ > } > >- /** >- * XML Parser-required method: XML-parser Error. >+ /** >+ * XML Parser-required method: XML-parser Error. > */ >- public void error(SAXParseException ex) >+ public void error(SAXParseException ex) > { > /** TODO - DKM move this somewhere else since system message now needs to be eclipse independent > SystemBasePlugin.logError("SystemMessageFile: Error parsing message file: "+ex.toString(), ex); >@@ -724,15 +850,15 @@ > */ > } > >- /** >- * XML Parser-required method: XML-parser Fatal error. >- */ >- public void fatalError(SAXParseException ex) throws SAXException >- { >- /** TODO - DKM move this somewhere else since system message now needs to be eclipse independent >+ /** >+ * XML Parser-required method: XML-parser Fatal error. >+ */ >+ public void fatalError(SAXParseException ex) throws SAXException >+ { >+ /** TODO - DKM move this somewhere else since system message now needs to be eclipse independent > SystemBasePlugin.logError("SystemMessageFile: Fatal Error parsing message file: "+ex.toString(), ex); > */ > throw(ex); >- } >- >+ } >+ > } >#P org.eclipse.rse.updatesite >Index: site.xml >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/releng/org.eclipse.rse.updatesite/site.xml,v >retrieving revision 1.79 >diff -u -r1.79 site.xml >--- site.xml 25 Sep 2008 17:31:35 -0000 1.79 >+++ site.xml 29 Sep 2008 18:26:05 -0000 >@@ -405,7 +405,7 @@ > </category-def> > <!-- END_3_0_1 --> > <!-- BEGIN_3_1 --> >- <feature url="features/org.eclipse.rse.core_3.0.100.qualifier.jar" id="org.eclipse.rse.core" version="3.0.100.qualifier"> >+ <feature url="features/org.eclipse.rse.core_3.1.0.qualifier.jar" id="org.eclipse.rse.core" version="3.1.0.qualifier"> > <category name="TM and RSE 3.1"/> > </feature> > <feature url="features/org.eclipse.rse.dstore_3.0.100.qualifier.jar" id="org.eclipse.rse.dstore" version="3.0.100.qualifier"> >@@ -417,10 +417,10 @@ > <feature url="features/org.eclipse.rse.local_2.1.1.qualifier.jar" id="org.eclipse.rse.local" version="2.1.1.qualifier"> > <category name="TM and RSE 3.1"/> > </feature> >- <feature url="features/org.eclipse.rse_3.0.100.qualifier.jar" id="org.eclipse.rse" version="3.0.100.qualifier"> >+ <feature url="features/org.eclipse.rse_3.1.0.qualifier.jar" id="org.eclipse.rse" version="3.1.0.qualifier"> > <category name="TM and RSE 3.1"/> > </feature> >- <feature url="features/org.eclipse.rse.sdk_3.0.100.qualifier.jar" id="org.eclipse.rse.sdk" version="3.0.100.qualifier"> >+ <feature url="features/org.eclipse.rse.sdk_3.1.0.qualifier.jar" id="org.eclipse.rse.sdk" version="3.1.0.qualifier"> > <category name="TM and RSE 3.1"/> > </feature> > <feature url="features/org.eclipse.rse.ssh_2.1.100.qualifier.jar" id="org.eclipse.rse.ssh" version="2.1.100.qualifier"> >#P org.eclipse.rse.ui >Index: META-INF/MANIFEST.MF >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/META-INF/MANIFEST.MF,v >retrieving revision 1.38 >diff -u -r1.38 MANIFEST.MF >--- META-INF/MANIFEST.MF 25 Sep 2008 17:19:20 -0000 1.38 >+++ META-INF/MANIFEST.MF 29 Sep 2008 18:26:07 -0000 >@@ -2,7 +2,7 @@ > Bundle-ManifestVersion: 2 > Bundle-Name: %pluginName > Bundle-SymbolicName: org.eclipse.rse.ui;singleton:=true >-Bundle-Version: 3.0.100.qualifier >+Bundle-Version: 3.1.0.qualifier > Bundle-Activator: org.eclipse.rse.ui.RSEUIPlugin > Bundle-Localization: plugin > Require-Bundle: org.eclipse.core.runtime, >@@ -14,7 +14,7 @@ > org.eclipse.ui.ide, > org.eclipse.ui.views, > org.eclipse.ui.workbench.texteditor, >- org.eclipse.rse.services;bundle-version="[3.0.0,4.0.0)", >+ org.eclipse.rse.services;bundle-version="[3.1.0,4.0.0)", > org.eclipse.rse.core;bundle-version="[3.0.0,4.0.0)" > Import-Package: com.ibm.icu.lang, > com.ibm.icu.text, >Index: UI/org/eclipse/rse/ui/messages/SystemUIMessageFile.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/messages/SystemUIMessageFile.java,v >retrieving revision 1.5 >diff -u -r1.5 SystemUIMessageFile.java >--- UI/org/eclipse/rse/ui/messages/SystemUIMessageFile.java 15 May 2007 23:54:30 -0000 1.5 >+++ UI/org/eclipse/rse/ui/messages/SystemUIMessageFile.java 29 Sep 2008 18:26:07 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************** >- * Copyright (c) 2004, 2007 IBM Corporation and others. All rights reserved. >+ * Copyright (c) 2004, 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 http://www.eclipse.org/legal/epl-v10.html >@@ -12,6 +12,7 @@ > * > * Contributors: > * Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin >+ * David McKnight (IBM) [246406] [performance] Timeout waiting when loading SystemPreferencesManager$ModelChangeListener during startup > ********************************************************************************/ > > package org.eclipse.rse.ui.messages; >@@ -33,8 +34,8 @@ > public class SystemUIMessageFile extends SystemMessageFile { > > /** >- * Factory method for constructing a SystemUIMessageFile. If an error occurs when >- * reading the message file DTD then that is logged. >+ * Factory method for constructing a SystemUIMessageFile that loads the message file synchronously. >+ * If an error occurs when reading the message file DTD then that is logged. > * @param messageFileName The "registered" name of the message file. Used to determine > * if the message file has been loaded. > * @param messageFileStream The stream containing the message file. It is the >@@ -59,13 +60,58 @@ > } > return result; > } >+ >+ /** >+ * Factory method for constructing a SystemUIMessageFile that loads the message file in a thread. >+ * >+ * The difference between {@link #getMessageFile(String,InputStream)} and this method >+ * is that the former calls the constructor that loads the message file synchronously >+ * while this one loads the message file in a worker thread. The message file URL is >+ * passed in here so that the opening of it's input stream can be deferred until the >+ * time when the worker thread is started and able to load the message file. >+ * >+ * @param messageFileName The name of the message file to load. >+ * @param messageFileURL The URL to the message file. >+ * @return The message file that was constructed. >+ * >+ * @since 3.1 >+ */ >+ public static SystemUIMessageFile getMessageFile(String messageFileName, >+ URL messageFileURL) { >+ SystemUIMessageFile result = null; >+ URL dtdURL = RSEUIPlugin.getDefault().getMessageFileDTD(); >+ if (dtdURL != null) { >+ result = new SystemUIMessageFile(messageFileName,messageFileURL, dtdURL); >+ } else { >+ SystemBasePlugin.logError("Could not find mesage file DTD."); //$NON-NLS-1$ >+ } >+ return result; >+ } >+ > >+ /** >+ * Constructor for synchronous loading of the message file. >+ * >+ * This is private because this is not to be called directly, but rather >+ * from {@link #getMessageFile(String, InputStream)}. >+ */ > private SystemUIMessageFile(String messageFileName, > InputStream messageFileStream, InputStream dtdStream) { > super(messageFileName, messageFileStream, dtdStream); > } > > /** >+ * Constructor for lazy loading of the message file. >+ * >+ * This is private because this is not to be called directly, but rather >+ * from {@link #getMessageFile(String, URL)}. >+ */ >+ private SystemUIMessageFile(String messageFileName, >+ URL messageFileURL, URL dtdURL) { >+ super(messageFileName, messageFileURL, dtdURL); >+ } >+ >+ /** > * Override this to provide different extended SystemMessage implementation > * > * @param componentAbbr >Index: UI/org/eclipse/rse/ui/SystemBasePlugin.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/SystemBasePlugin.java,v >retrieving revision 1.9 >diff -u -r1.9 SystemBasePlugin.java >--- UI/org/eclipse/rse/ui/SystemBasePlugin.java 27 Aug 2008 20:51:24 -0000 1.9 >+++ UI/org/eclipse/rse/ui/SystemBasePlugin.java 29 Sep 2008 18:26:07 -0000 >@@ -15,11 +15,11 @@ > * Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin > * David McKnight (IBM) - [243263] NPE on expanding a filter > * David McKnight (IBM) - [244454] SystemBasePlugin.getWorkBench() incorrectly returns null when called during Eclipse startup >+ * David McKnight (IBM) [246406] [performance] Timeout waiting when loading SystemPreferencesManager$ModelChangeListener during startup > ********************************************************************************/ > > package org.eclipse.rse.ui; > >-import java.io.InputStream; > import java.net.URL; > import java.util.Hashtable; > import java.util.Locale; >@@ -302,9 +302,7 @@ > try { > URL url = resolveBundleNameNL(bundle, fileName); > if (url != null) { >- InputStream messageFileStream = url.openStream(); >- mf = SystemUIMessageFile.getMessageFile(fileName, messageFileStream); >- messageFileStream.close(); >+ mf = SystemUIMessageFile.getMessageFile(fileName, url); > ok = true; > } > } catch (Throwable t) { >@@ -345,10 +343,8 @@ > boolean ok = false; > try { > URL url = bundle.getEntry("/"+fileName); //$NON-NLS-1$ >- if (url != null) { >- InputStream messageFileStream = url.openStream(); >- mf = SystemUIMessageFile.getMessageFile(fileName, messageFileStream); >- messageFileStream.close(); >+ if (url != null) { >+ mf = SystemUIMessageFile.getMessageFile(fileName, url); > ok = true; > } > } catch (Throwable t) { >#P org.eclipse.rse.core-feature >Index: feature.xml >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/features/org.eclipse.rse.core-feature/feature.xml,v >retrieving revision 1.35 >diff -u -r1.35 feature.xml >--- feature.xml 23 Sep 2008 15:28:19 -0000 1.35 >+++ feature.xml 29 Sep 2008 18:26:09 -0000 >@@ -2,7 +2,7 @@ > <feature > id="org.eclipse.rse.core" > label="%featureName" >- version="3.0.100.qualifier" >+ version="3.1.0.qualifier" > provider-name="%providerName" > plugin="org.eclipse.rse.core"> >
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 246406
:
113492
|
113632
|
113744
| 113784 |
142960