Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-dev] FYI, merged in a bunch of changes

Hi Chris.
I am quite unhappy with this checkin:
* It introduces new API after API freeze without a heads-up even without a bugzilla!
* It combines multiple changes into one commit without pointing out to what sort of bug the change relates to.
 
The change related to TranslationUnit is not correct (causes NPEs), I have undone it (see my attachment). 
Please go through the regular process of creating a bug and proposing a solution.
 
Markus.
 


From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Chris Recoskie
Sent: Wednesday, May 12, 2010 12:55 AM
To: CDT General developers list.
Subject: [cdt-dev] FYI, merged in a bunch of changes
Importance: Low

- Merged changes from cdt_5_0 to HEAD. Too many to mention individually.
- Reworked IFileSystem utility so that now it is noimplement/noextend. Clients should now extend from concrete class FileSystemUtility instead to better insulate them from future API changes.
- Reworked the resulting concurrency fixes - indexing and scanner discovery now synchronize on the project root as a scheduling rule. Original HEAD behaviour was to synch on the project's .settings folder for indexing, but that deadlocked with scanner discovery. James, you will probably want to take a look at what I did there and make sure you are comfortable with it, as I know you have been trying to relax the scheduling rules as much as possible. If you think it needs some rework let me know.
- Fixed remote indexing. Changes on HEAD that deprecated CodeReader broke the ability for remote translation units to provide the path to load the file content from. Added API to ITranslationUnit for this purpose.

The tests all pass, but let me know if you run into any problems, particularly if you encounter any concurrency issues.

FYI error parsing seems broken for remote projects. I intend to start looking into that tomorrow.

===========================
Chris Recoskie
Team Lead, IBM CDT and RDT
IBM Toronto

### Eclipse Workspace Patch 1.0
#P org.eclipse.cdt.core
Index: .settings/.api_filters
===================================================================
RCS file: /cvsroot/tools/org.eclipse.cdt-core/org.eclipse.cdt.core/.settings/.api_filters,v
retrieving revision 1.3
diff -u -r1.3 .api_filters
--- .settings/.api_filters	11 May 2010 22:50:10 -0000	1.3
+++ .settings/.api_filters	12 May 2010 09:01:21 -0000
@@ -1,4 +1,5 @@
-<?xml version="1.0" encoding="UTF-8"?><component id="org.eclipse.cdt.core" version="2">
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<component id="org.eclipse.cdt.core" version="2">
     <resource path="parser/org/eclipse/cdt/core/dom/ast/IASTImplicitName.java" type="org.eclipse.cdt.core.dom.ast.IASTImplicitName">
         <filter id="403853384">
             <message_arguments>
@@ -41,12 +42,4 @@
             </message_arguments>
         </filter>
     </resource>
-    <resource path="src/org/eclipse/cdt/core/IFilesystemUtility.java" type="org.eclipse.cdt.core.IFilesystemUtility">
-        <filter id="1109393411">
-            <message_arguments>
-                <message_argument value="5.0.3"/>
-                <message_argument value="org.eclipse.cdt.core.IFilesystemUtility"/>
-            </message_arguments>
-        </filter>
-    </resource>
-</component>
\ No newline at end of file
+</component>
Index: model/org/eclipse/cdt/core/model/ITranslationUnit.java
===================================================================
RCS file: /cvsroot/tools/org.eclipse.cdt-core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/ITranslationUnit.java,v
retrieving revision 1.37
diff -u -r1.37 ITranslationUnit.java
--- model/org/eclipse/cdt/core/model/ITranslationUnit.java	11 May 2010 22:50:10 -0000	1.37
+++ model/org/eclipse/cdt/core/model/ITranslationUnit.java	12 May 2010 09:01:21 -0000
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 QNX Software Systems and others.
+ * Copyright (c) 2000, 2009 QNX Software Systems 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
@@ -8,7 +8,6 @@
  * Contributors:
  *     QNX Software Systems - Initial API and implementation
  *     Markus Schorn (Wind River Systems)
- *     IBM Corporation
  *******************************************************************************/
 package org.eclipse.cdt.core.model;
 
@@ -487,15 +486,5 @@
 	@Deprecated
 	org.eclipse.cdt.core.parser.CodeReader getCodeReader();
 
-	/**
-	 * Returns the path to the file that should be used by the parser to access the file contents.
-	 * For local translation units, this will return the equivalent to <code>getLocation().toOSString()</code>
-	 * 
-	 * @since 5.2
-	 * @return String representing the path that should be used to obtain the file content.
-	 * @see FileContent
-	 */
-	String getPathForFileContent();
-
 
 }
Index: model/org/eclipse/cdt/internal/core/model/TranslationUnit.java
===================================================================
RCS file: /cvsroot/tools/org.eclipse.cdt-core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/TranslationUnit.java,v
retrieving revision 1.108
diff -u -r1.108 TranslationUnit.java
--- model/org/eclipse/cdt/internal/core/model/TranslationUnit.java	11 May 2010 22:50:09 -0000	1.108
+++ model/org/eclipse/cdt/internal/core/model/TranslationUnit.java	12 May 2010 09:01:21 -0000
@@ -1133,11 +1133,4 @@
 	public IWorkingCopy getSharedWorkingCopy(IProgressMonitor monitor, IBufferFactory factory) throws CModelException {
 		return CModelManager.getDefault().getSharedWorkingCopy(factory, this, null, monitor);
 	}
-
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.core.model.ITranslationUnit#getPathForFileContent()
-	 */
-	public String getPathForFileContent() {
-		return getLocation().toOSString();
-	}
 }
Index: parser/org/eclipse/cdt/core/parser/FileContent.java
===================================================================
RCS file: /cvsroot/tools/org.eclipse.cdt-core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/FileContent.java,v
retrieving revision 1.3
diff -u -r1.3 FileContent.java
--- parser/org/eclipse/cdt/core/parser/FileContent.java	11 May 2010 22:50:10 -0000	1.3
+++ parser/org/eclipse/cdt/core/parser/FileContent.java	12 May 2010 09:01:21 -0000
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009, 2010 Wind River Systems, Inc. and others.
+ * Copyright (c) 2009 Wind River Systems, Inc. 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
@@ -8,7 +8,6 @@
  * Contributors:
  *    Markus Schorn - initial API and implementation
  *    Sergey Prigogin (Google)
- *    IBM Corporation
  *******************************************************************************/ 
 package org.eclipse.cdt.core.parser;
 
@@ -57,7 +56,7 @@
 	public static FileContent create(ITranslationUnit tu) {
 		IPath location= tu.getLocation();
 		if (location == null)
-			return create(tu.getPathForFileContent(), tu.getContents());
+			return create(tu.getElementName(), tu.getContents());
 		
 		if (tu.isWorkingCopy()) {
 			return create(location.toOSString(), tu.getContents());

Back to the top