mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-07 00:55:24 +02:00
Remove unuse method parser(Inputstream in)
This commit is contained in:
parent
56ca1ac8d7
commit
b91a9b0446
1 changed files with 7 additions and 24 deletions
|
@ -5,8 +5,6 @@ package org.eclipse.cdt.internal.core.model;
|
||||||
* All Rights Reserved.
|
* All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.io.InputStream;
|
|
||||||
import java.io.StringBufferInputStream;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
@ -205,18 +203,6 @@ public class TranslationUnit extends Openable implements ITranslationUnit {
|
||||||
return sourceManipulationInfo;
|
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 () {
|
protected CElementInfo createElementInfo () {
|
||||||
return new TranslationUnitInfo(this);
|
return new TranslationUnitInfo(this);
|
||||||
}
|
}
|
||||||
|
@ -476,16 +462,13 @@ public class TranslationUnit extends Openable implements ITranslationUnit {
|
||||||
* Parse the buffer contents of this element.
|
* Parse the buffer contents of this element.
|
||||||
*/
|
*/
|
||||||
public Map parse(){
|
public Map parse(){
|
||||||
try{
|
try {
|
||||||
String buf =this.getBuffer().getContents();
|
removeChildren();
|
||||||
if (buf != null) {
|
CModelBuilder modelBuilder = new CModelBuilder(this);
|
||||||
StringBufferInputStream in = new StringBufferInputStream (buf);
|
return modelBuilder.parse();
|
||||||
return (parse (in));
|
} catch (Exception e) {
|
||||||
}
|
// FIXME: use the debug log for this exception.
|
||||||
return null;
|
//System.out.println(e);
|
||||||
|
|
||||||
} catch (CModelException e){
|
|
||||||
// error getting the buffer
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue