Revision: 18852
http://sourceforge.net/p/gate/code/18852
Author: markagreenwood
Date: 2015-08-05 05:10:24 +0000 (Wed, 05 Aug 2015)
Log Message:
-----------
rolled back the addition of text to the toolbar buttons as a) we said it should
be opt in not the new default, and b) when the text is shown the buttons don't
fit within the default window size
Modified Paths:
--------------
gate/trunk/gate.l4j.ini
gate/trunk/plugins/Format_CSV/gcp/sample/batch.xml
gate/trunk/plugins/Format_HTML5Microdata/src/gate/creole/microdata/MicrodataExporter.java
gate/trunk/plugins/Tagger_Measurements/.classpath
gate/trunk/plugins/Tagger_Measurements/src/gate/creole/measurements/Measurement.java
gate/trunk/plugins/Tagger_Measurements/src/gate/creole/measurements/MeasurementsParser.java
gate/trunk/src/main/gate/gui/MainFrame.java
gate/trunk/src/main/gate/gui/OptionsDialog.java
Modified: gate/trunk/gate.l4j.ini
===================================================================
--- gate/trunk/gate.l4j.ini 2015-08-05 01:19:59 UTC (rev 18851)
+++ gate/trunk/gate.l4j.ini 2015-08-05 05:10:24 UTC (rev 18852)
@@ -1,2 +1,2 @@
--Xmx1G
+-Xmx8G
-Xms200m
Modified: gate/trunk/plugins/Format_CSV/gcp/sample/batch.xml
===================================================================
--- gate/trunk/plugins/Format_CSV/gcp/sample/batch.xml 2015-08-05 01:19:59 UTC
(rev 18851)
+++ gate/trunk/plugins/Format_CSV/gcp/sample/batch.xml 2015-08-05 05:10:24 UTC
(rev 18852)
@@ -6,12 +6,12 @@
<report file="report.xml" />
<input class="gate.cloud.io.csv.CSVStreamingInputHandler"
- srcFile="input.csv"
+ srcFile="tweets.csv"
encoding="UTF-8"
separator=","
quote='"'
- column="1"
- labelledColumns="false" />
+ column="11"
+ labelledColumns="true" />
<output
dir="output"
Modified:
gate/trunk/plugins/Format_HTML5Microdata/src/gate/creole/microdata/MicrodataExporter.java
===================================================================
---
gate/trunk/plugins/Format_HTML5Microdata/src/gate/creole/microdata/MicrodataExporter.java
2015-08-05 01:19:59 UTC (rev 18851)
+++
gate/trunk/plugins/Format_HTML5Microdata/src/gate/creole/microdata/MicrodataExporter.java
2015-08-05 05:10:24 UTC (rev 18852)
@@ -113,6 +113,8 @@
for(Integer id : created) {
originalMarkups.remove(originalMarkups.get(id));
}
- }
+ }
+
+ pout.flush();
}
}
Modified: gate/trunk/plugins/Tagger_Measurements/.classpath
===================================================================
--- gate/trunk/plugins/Tagger_Measurements/.classpath 2015-08-05 01:19:59 UTC
(rev 18851)
+++ gate/trunk/plugins/Tagger_Measurements/.classpath 2015-08-05 05:10:24 UTC
(rev 18852)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry combineaccessrules="false" exported="true" kind="src"
path="/GATE"/>
<classpathentry kind="output" path="classes"/>
</classpath>
Modified:
gate/trunk/plugins/Tagger_Measurements/src/gate/creole/measurements/Measurement.java
===================================================================
---
gate/trunk/plugins/Tagger_Measurements/src/gate/creole/measurements/Measurement.java
2015-08-05 01:19:59 UTC (rev 18851)
+++
gate/trunk/plugins/Tagger_Measurements/src/gate/creole/measurements/Measurement.java
2015-08-05 05:10:24 UTC (rev 18852)
@@ -160,6 +160,8 @@
Parser psr = new Parser(lex, parser);
+ System.out.println("created parser");
+
// this may thrown an exception because of the space change.
// i.e. it throws an exception when it parses 100 m m as the last m is a
// unit but wasn't expected whilst it parses 10 m blah OK and returns 100 m
@@ -168,6 +170,8 @@
// clever if somewhere in the parser or lexer to handle this
Parser.Symbol result = psr.unitexpr();
+ System.out.println("got result");
+
if(result == null)
throw new Parser.Exception("string '" + s + "' is not a unit");
@@ -259,9 +263,12 @@
MeasurementsParser parser) {
try {
Measurement v = parse(unit, index, parser);
+ System.out.println("parsed");
v.factor = amount;
v.completereduce();
+ System.out.println("done reduce");
DefinedFunction func = parser.functions.get(v.getNormalizedUnit());
+ System.out.println("got func");
if(func != null) {
Measurement fv = new Measurement(parser);
fv.factor = amount;
@@ -545,7 +552,10 @@
boolean botchanged = reduceproduct(true);
if(!topchanged && !botchanged) break;
}
+
+ System.out.println("out of loop");
cancel();
+ System.out.println("about to return");
}
/**
Modified:
gate/trunk/plugins/Tagger_Measurements/src/gate/creole/measurements/MeasurementsParser.java
===================================================================
---
gate/trunk/plugins/Tagger_Measurements/src/gate/creole/measurements/MeasurementsParser.java
2015-08-05 01:19:59 UTC (rev 18851)
+++
gate/trunk/plugins/Tagger_Measurements/src/gate/creole/measurements/MeasurementsParser.java
2015-08-05 05:10:24 UTC (rev 18852)
@@ -481,8 +481,8 @@
}
public static void main(String args[]) throws MalformedURLException,
IOException {
- MeasurementsParser parser = new MeasurementsParser((new
File("plugins/Tagger_Measurements/resources/units.dat")).toURI().toURL(), (new
File("plugins/Tagger_Measurements/resources/common_words.txt")).toURI().toURL());
- Measurement m = parser.parse(20, "mg p");
+ MeasurementsParser parser = new MeasurementsParser((new
File("resources/units.dat")).toURI().toURL(), (new
File("resources/common_words.txt")).toURI().toURL());
+ Measurement m = parser.parse(20, "GB //");
System.out.println(m.getParsedText());
}
}
Modified: gate/trunk/src/main/gate/gui/MainFrame.java
===================================================================
--- gate/trunk/src/main/gate/gui/MainFrame.java 2015-08-05 01:19:59 UTC (rev
18851)
+++ gate/trunk/src/main/gate/gui/MainFrame.java 2015-08-05 05:10:24 UTC (rev
18852)
@@ -544,11 +544,11 @@
height, maxDimensions.height)));
if (Gate.getUserConfig().getBoolean(GateConstants.MAIN_FRAME_MAXIMIZED))
setExtendedState(JFrame.MAXIMIZED_BOTH);
-
+
setIconImages(Arrays.asList(new Image[]{new GATEVersionIcon(64,
64).getImage(),
new GATEVersionIcon(48, 48).getImage(), new GATEVersionIcon(32,
32).getImage(),
new GATEIcon(22, 22).getImage(), new GATEIcon(16, 16).getImage()}));
-
+
resourcesTree = new ResourcesTree();
resourcesTree.setModel(resourcesTreeModel);
resourcesTree.setRowHeight(0);
@@ -654,7 +654,7 @@
// Create a new logArea and redirect the Out and Err output to it.
logArea = new LogArea();
-
+
// Out has been redirected to the logArea
Out.prln("GATE " + Main.version + " build " + Main.build + " started at "
@@ -881,9 +881,9 @@
// The log4j-over-slf4j bridge does not include
org.apache.log4j.Appender, so
// if the class is not present we assume the lack of a log4j jar in the
classpath
// and do not populate the menu.
- Class.forName("org.apache.log4j.Appender");
-
-
+ Class.forName("org.apache.log4j.Appender");
+
+
final JMenuItem reportClearMenuItem = new XJMenuItem(
new AbstractAction("Clear Profiling History") {
{ putValue(SHORT_DESCRIPTION,
@@ -907,11 +907,11 @@
new AbstractAction("Start Profiling Applications") {
{ putValue(SHORT_DESCRIPTION,
"Toggles the profiling of processing resources"); }
-
+
// stores the value held by the benchmarking switch before we started
// this profiling run.
boolean benchmarkWasEnabled;
-
+
@Override
public void actionPerformed(ActionEvent evt) {
if (getValue(NAME).equals("Start Profiling Applications")) {
@@ -955,7 +955,7 @@
}
}, this));
reportMenu.addSeparator();
-
+
final JCheckBoxMenuItem reportZeroTimesCheckBox = new
JCheckBoxMenuItem();
reportZeroTimesCheckBox.setAction(
new AbstractAction("Report Zero Time Entries") {
@@ -1016,7 +1016,7 @@
reportMenu.add(reportSortTime);
reportMenu.add(reportSortExecution);
reportMenu.addSeparator();
-
+
reportMenu.add(new XJMenuItem(
new AbstractAction("Report on Documents Processed") {
{ putValue(SHORT_DESCRIPTION, "Report most time consuming
documents"); }
@@ -1107,9 +1107,9 @@
new JCheckBoxMenuItem(new VerboseModeCorpusEvalToolAction());
corpusEvalMenu.add(verboseModeItem);
- toolsMenu.staticItemsAdded();
+ toolsMenu.staticItemsAdded();
menuBar.add(toolsMenu);
-
+
JMenu helpMenu = new XJMenu("Help", null, MainFrame.this);
helpMenu.setMnemonic(KeyEvent.VK_H);
helpMenu.add(new XJMenuItem(new HelpUserGuideAction(), this));
@@ -1186,13 +1186,11 @@
guiRoots.add(dssPopup);
// TOOLBAR
- boolean showToolbarText =
Gate.getUserConfig().getBoolean(GateConstants.TOOLBAR_TEXT);
-
toolbar = new JToolBar(JToolBar.HORIZONTAL);
toolbar.setFloatable(false);
JButton button = new JButton(new LoadResourceFromFileAction());
button.setToolTipText(button.getText());
- button.setText(showToolbarText ? "Load Application" : "");
+ button.setText("");
toolbar.add(button);
toolbar.addSeparator();
@@ -1205,31 +1203,24 @@
JMenuButton menuButton = new JMenuButton(annieMenu);
menuButton.setIcon(getIcon("annie-application"));
menuButton.setToolTipText("Load ANNIE System");
- menuButton.setText(showToolbarText ? "Load ANNIE" : "");
-
toolbar.add(menuButton);
toolbar.addSeparator();
LiveMenu tbNewLRMenu = new LiveMenu(LiveMenu.LR);
menuButton = new JMenuButton(tbNewLRMenu);
menuButton.setToolTipText("New Language Resource");
- menuButton.setText(showToolbarText ? "New LR" : "");
menuButton.setIcon(getIcon("lrs"));
toolbar.add(menuButton);
LiveMenu tbNewPRMenu = new LiveMenu(LiveMenu.PR);
menuButton = new JMenuButton(tbNewPRMenu);
menuButton.setToolTipText("New Processing Resource");
- menuButton.setText(showToolbarText ? "New PR" : "");
-
menuButton.setIcon(getIcon("prs"));
toolbar.add(menuButton);
LiveMenu tbNewAppMenu = new LiveMenu(LiveMenu.APP);
menuButton = new JMenuButton(tbNewAppMenu);
- menuButton.setToolTipText("New App");
- menuButton.setText(showToolbarText ? "New Application" : "");
-
+ menuButton.setToolTipText("New Application");
menuButton.setIcon(getIcon("applications"));
toolbar.add(menuButton);
toolbar.addSeparator();
@@ -1240,19 +1231,17 @@
menuButton = new JMenuButton(tbDsMenu);
menuButton.setToolTipText("Datastores");
menuButton.setIcon(getIcon("datastores"));
- menuButton.setText(showToolbarText ? "Manage Datastores" : "");
-
toolbar.add(menuButton);
toolbar.addSeparator();
button = new JButton(new ManagePluginsAction());
button.setToolTipText(button.getText());
- button.setText(showToolbarText ? "Manage Plugins" : "");
+ button.setText("");
toolbar.add(button);
toolbar.addSeparator();
button = new JButton(new NewAnnotDiffAction());
button.setToolTipText(button.getText());
- button.setText(showToolbarText ? "Annotation Diff" : "");
+ button.setText("");
toolbar.add(button);
toolbar.add(Box.createHorizontalGlue());
@@ -1491,14 +1480,6 @@
inputMap.put(KeyStroke.getKeyStroke("control shift H"), "Hide all");
inputMap.put(KeyStroke.getKeyStroke("control S"), "Save As XML");
- // OSX friendly commands
- inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_W,
- Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()), "Close
resource");
- inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_W,
- InputEvent.SHIFT_DOWN_MASK |
Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()), "Close recursively");
-
-
-
// add the support of the context menu key in tables and trees
// TODO: remove when Swing will take care of the context menu key
if (inputMap.get(KeyStroke.getKeyStroke("CONTEXT_MENU")) == null) {
@@ -3524,7 +3505,6 @@
fileChooser.setDialogTitle("Select the datastore directory");
fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
fileChooser.setResource("gate.DataStore.data");
-
if(fileChooser.showOpenDialog(MainFrame.this)
== JFileChooser.APPROVE_OPTION) {
try {
@@ -3651,7 +3631,6 @@
putValue(SHORT_DESCRIPTION,
"Restores a previously saved application from a file");
putValue(SMALL_ICON, getIcon("open-application"));
- putValue(NAME, "Restore Application");
}
@Override
Modified: gate/trunk/src/main/gate/gui/OptionsDialog.java
===================================================================
--- gate/trunk/src/main/gate/gui/OptionsDialog.java 2015-08-05 01:19:59 UTC
(rev 18851)
+++ gate/trunk/src/main/gate/gui/OptionsDialog.java 2015-08-05 05:10:24 UTC
(rev 18852)
@@ -31,11 +31,29 @@
import java.util.Iterator;
import java.util.List;
-import javax.swing.*;
+import javax.swing.AbstractAction;
+import javax.swing.ActionMap;
+import javax.swing.BorderFactory;
+import javax.swing.Box;
+import javax.swing.BoxLayout;
+import javax.swing.ButtonGroup;
+import javax.swing.InputMap;
+import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JComboBox;
+import javax.swing.JComponent;
+import javax.swing.JDialog;
+import javax.swing.JFrame;
+import javax.swing.JPanel;
+import javax.swing.JRadioButton;
+import javax.swing.JTabbedPane;
+import javax.swing.JTextField;
+import javax.swing.KeyStroke;
+import javax.swing.LookAndFeel;
+import javax.swing.SwingUtilities;
+import javax.swing.UIManager;
import javax.swing.plaf.FontUIResource;
-
-
/**
* The options dialog for Gate.
*/
@@ -72,9 +90,7 @@
//the LNF combo
List<LNFData> supportedLNFs = new ArrayList<LNFData>();
LNFData currentLNF = null;
-
UIManager.LookAndFeelInfo[] lnfs = UIManager.getInstalledLookAndFeels();
-
for (UIManager.LookAndFeelInfo lnf : lnfs) {
try {
Class<?> lnfClass = Class.forName(lnf.getClassName());
@@ -90,13 +106,10 @@
e.printStackTrace();
}
}
-
lnfCombo = new JComboBox<LNFData>(supportedLNFs.toArray(new
LNFData[supportedLNFs.size()]));
lnfCombo.setSelectedItem(currentLNF);
lnfCombo.setToolTipText("Be aware that only 'Metal' is fully tested.");
- showToolBarTextChk = new JCheckBox("Show text in GATE toolbar",
- userConfig.getBoolean(GateConstants.TOOLBAR_TEXT));
fontBG = new ButtonGroup();
textBtn = new JRadioButton("Text components font");
textBtn.setActionCommand("text");
@@ -128,21 +141,7 @@
appearanceBox.add(Box.createVerticalStrut(5));
- vBox = Box.createVerticalBox();
- vBox.setBackground(getContentPane().getBackground());
- vBox.setBorder(BorderFactory.createTitledBorder(" Resource Toolbar
(requires restart) "));
- vBox.add(Box.createVerticalStrut(5));
-
hBox = Box.createHorizontalBox();
- hBox.add(showToolBarTextChk);
- vBox.add(hBox);
- vBox.add(Box.createVerticalStrut(5));
- hBox.add(Box.createHorizontalStrut(5));
- hBox.add(Box.createHorizontalGlue());
- appearanceBox.add(vBox);
- appearanceBox.add(Box.createVerticalStrut(5));
-
- hBox = Box.createHorizontalBox();
hBox.setBorder(BorderFactory.createTitledBorder(" Font options "));
hBox.add(Box.createHorizontalStrut(5));
vBox = Box.createVerticalBox();
@@ -510,13 +509,6 @@
}
}
- boolean oldToolBarText =
userConfig.getBoolean(GateConstants.TOOLBAR_TEXT);
- if (showToolBarTextChk.isSelected() != oldToolBarText) {
- JOptionPane.showMessageDialog(null, "Please restart GATE to apply
changes to toolbar.");
- }
-
- userConfig.put(GateConstants.TOOLBAR_TEXT,
- showToolBarTextChk.isSelected());
userConfig.put(GateConstants.SAVE_OPTIONS_ON_EXIT,
saveOptionsChk.isSelected());
userConfig.put(GateConstants.SAVE_SESSION_ON_EXIT,
@@ -670,11 +662,6 @@
protected JCheckBox addSpaceOnMarkupUnpackChk;
/**
- * The "Show text in toolbar" checkbox
- */
- protected JCheckBox showToolBarTextChk;
-
- /**
* The name of the look and feel class
*/
protected String lookAndFeelClassName;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs