eclipse plugin:

- use system font for showing messages

- schema parser should use the schema.cfg from user's setted location
This commit is contained in:
Timotei Dolean 2010-07-08 22:08:18 +00:00
parent 03c8a81477
commit 525b783c22
2 changed files with 12 additions and 6 deletions

View file

@ -8,6 +8,8 @@ import java.io.File;
import java.util.HashMap;
import java.util.Stack;
import wesnoth_eclipse_plugin.preferences.PreferenceConstants;
import wesnoth_eclipse_plugin.preferences.PreferenceInitializer;
import wesnoth_eclipse_plugin.utils.ResourceUtils;
import wesnoth_eclipse_plugin.utils.StringUtils;
@ -31,7 +33,9 @@ public class SchemaParser
if (parsingDone_ && !force)
return;
String res = ResourceUtils.getFileContents(new File("D:\\timo\\gw\\data\\schema.cfg"));
File schemaFile = new File(PreferenceInitializer.getString(
PreferenceConstants.P_WESNOTH_WORKING_DIR) + "/data/schema.cfg");
String res = ResourceUtils.getFileContents(schemaFile);
String[] lines = StringUtils.getLines(res);
Stack<String> tagStack = new Stack<String>();

View file

@ -4,11 +4,11 @@
*/
package wesnoth_eclipse_plugin.wizards.generator;
import com.swtdesigner.SWTResourceManager;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
public class WizardGeneratorPage404 extends WizardPage
@ -27,9 +27,11 @@ public class WizardGeneratorPage404 extends WizardPage
setControl(container);
Font font = new Font(Display.getDefault().getSystemFont().getDevice(),
Display.getDefault().getSystemFont().getFontData()[0].getName(), 20, SWT.NORMAL);
Label lblThisIsSooo = new Label(container, SWT.WRAP);
lblThisIsSooo.setFont(SWTResourceManager.getFont("Segoe UI", 13, SWT.NORMAL));
lblThisIsSooo.setBounds(82, 65, 415, 132);
lblThisIsSooo.setText("This is embarassing. It shouldn't happen. \r\nIt seems something is missing from the schema.cfg");
lblThisIsSooo.setFont(font);
lblThisIsSooo.setBounds(10, 89, 554, 137);
lblThisIsSooo.setText("This is embarassing. It shouldn't happen. \r\nIt seems something is missing from schema.cfg");
}
}