eclipse plugin: enable the schema parsing from a specified file
This commit is contained in:
parent
8d56f6c1d3
commit
9dfc4d6e74
1 changed files with 12 additions and 2 deletions
|
@ -42,6 +42,17 @@ public class SchemaParser
|
|||
* @param force True to force parsing the schema, skipping the existing cache
|
||||
*/
|
||||
public void parseSchema(boolean force)
|
||||
{
|
||||
parseSchema(force, Preferences.getString(
|
||||
Constants.P_WESNOTH_WORKING_DIR) + "/data/schema.cfg");
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses the schema
|
||||
* @param force True to force parsing the schema, skipping the existing cache
|
||||
* @param schemaPath The path to the 'schema.cfg' file
|
||||
*/
|
||||
public void parseSchema(boolean force, String schemaPath)
|
||||
{
|
||||
if (parsingDone_ && !force)
|
||||
{
|
||||
|
@ -57,8 +68,7 @@ public class SchemaParser
|
|||
}
|
||||
|
||||
Logger.getInstance().log("parsing schema " + (force == true ? "forced" : ""));
|
||||
File schemaFile = new File(Preferences.getString(
|
||||
Constants.P_WESNOTH_WORKING_DIR) + "/data/schema.cfg");
|
||||
File schemaFile = new File(schemaPath);
|
||||
String res = ResourceUtils.getFileContents(schemaFile);
|
||||
String[] lines = StringUtils.getLines(res);
|
||||
Stack<String> tagStack = new Stack<String>();
|
||||
|
|
Loading…
Add table
Reference in a new issue