[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[cdt-patch] Remove of TranslationUnit.parse(InputStream)
|
Index: ChangeLog
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/ChangeLog,v
retrieving revision 1.153
diff -u -r1.153 ChangeLog
--- ChangeLog 24 Sep 2003 14:48:29 -0000 1.153
+++ ChangeLog 24 Sep 2003 15:01:49 -0000
@@ -1,5 +1,17 @@
2003-09-24 Alain Magloire
+ With the removal of the old CDT parser, there was no
+ need to keep this method around
+ parser(InputStream in)
+ in the TranslationUnit. The parser content is retrieve via
+ the IBuffer now. The method
+ parser()
+ calss the CModelBuilder directly.
+
+ * src/org/eclipse/cdt/internal/core/model/TranslationUnit.java
+
+2003-09-24 Alain Magloire
+
* src/org/eclipse/cdt/core/ErrorParserManager.java
Possible NPE fix, when hitting cancel.
Index: model/org/eclipse/cdt/internal/core/model/TranslationUnit.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/TranslationUnit.java,v
retrieving revision 1.12
diff -u -r1.12 TranslationUnit.java
--- model/org/eclipse/cdt/internal/core/model/TranslationUnit.java 10 Sep 2003 14:26:00 -0000 1.12
+++ model/org/eclipse/cdt/internal/core/model/TranslationUnit.java 24 Sep 2003 15:01:49 -0000
@@ -5,8 +5,6 @@
* All Rights Reserved.
*/
-import java.io.InputStream;
-import java.io.StringBufferInputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
@@ -205,18 +203,6 @@
return sourceManipulationInfo;
}
- protected Map parse(InputStream in) {
- try {
- removeChildren();
-
- CModelBuilder modelBuilder = new CModelBuilder(this);
- return modelBuilder.parse();
- } catch (Exception e) {
- System.out.println(e);
- return null;
- }
- }
-
protected CElementInfo createElementInfo () {
return new TranslationUnitInfo(this);
}
@@ -476,16 +462,13 @@
* Parse the buffer contents of this element.
*/
public Map parse(){
- try{
- String buf =this.getBuffer().getContents();
- if (buf != null) {
- StringBufferInputStream in = new StringBufferInputStream (buf);
- return (parse (in));
- }
- return null;
-
- } catch (CModelException e){
- // error getting the buffer
+ try {
+ removeChildren();
+ CModelBuilder modelBuilder = new CModelBuilder(this);
+ return modelBuilder.parse();
+ } catch (Exception e) {
+ // FIXME: use the debug log for this exception.
+ //System.out.println(e);
return null;
}
}