Revision: 17872
http://sourceforge.net/p/gate/code/17872
Author: markagreenwood
Date: 2014-04-18 10:54:08 +0000 (Fri, 18 Apr 2014)
Log Message:
-----------
cleaned up the java 7 warnings and updated the build.xml and eclipse files to
use java 7 as well
Modified Paths:
--------------
gate/trunk/plugins/Alignment/.classpath
gate/trunk/plugins/Alignment/build.xml
gate/trunk/plugins/Alignment/src/gate/alignment/gui/AlignmentEditor.java
gate/trunk/plugins/Alignment/src/gate/compound/gui/CompoundDocumentEditor.java
gate/trunk/plugins/Gazetteer_LKB/.classpath
gate/trunk/plugins/Gazetteer_LKB/build.xml
gate/trunk/plugins/JAPE_Plus/.classpath
gate/trunk/plugins/JAPE_Plus/build.xml
Modified: gate/trunk/plugins/Alignment/.classpath
===================================================================
--- gate/trunk/plugins/Alignment/.classpath 2014-04-18 10:38:57 UTC (rev
17871)
+++ gate/trunk/plugins/Alignment/.classpath 2014-04-18 10:54:08 UTC (rev
17872)
@@ -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/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry combineaccessrules="false" exported="true" kind="src"
path="/GATE"/>
<classpathentry kind="output" path="classes"/>
</classpath>
Modified: gate/trunk/plugins/Alignment/build.xml
===================================================================
--- gate/trunk/plugins/Alignment/build.xml 2014-04-18 10:38:57 UTC (rev
17871)
+++ gate/trunk/plugins/Alignment/build.xml 2014-04-18 10:54:08 UTC (rev
17872)
@@ -35,7 +35,7 @@
<target name="compile" depends="init">
- <javac classpathref="compile.classpath" source="1.6"
target="1.6"
+ <javac classpathref="compile.classpath" source="1.7"
target="1.7"
debug="true" deprecation="true" destdir="${dest}"
nowarn="false" encoding="UTF-8">
<src path="${src}"/>
@@ -55,11 +55,11 @@
classpathref="compile.classpath"
encoding="UTF-8"
windowtitle="${plugin.name} JavaDoc"
- source="1.6">
+ source="1.7">
<sourcepath>
<pathelement location="${src}" />
</sourcepath>
- <link href="http://docs.oracle.com/javase/6/docs/api/"
/>
+ <link href="http://docs.oracle.com/javase/7/docs/api/"
/>
<link href="http://gate.ac.uk/gate/doc/javadoc/" />
</javadoc>
</target>
Modified:
gate/trunk/plugins/Alignment/src/gate/alignment/gui/AlignmentEditor.java
===================================================================
--- gate/trunk/plugins/Alignment/src/gate/alignment/gui/AlignmentEditor.java
2014-04-18 10:38:57 UTC (rev 17871)
+++ gate/trunk/plugins/Alignment/src/gate/alignment/gui/AlignmentEditor.java
2014-04-18 10:54:08 UTC (rev 17872)
@@ -106,17 +106,17 @@
/**
* Shows available alignment features alignment features
*/
- private JComboBox alignmentFeatures;
+ private JComboBox<String> alignmentFeatures;
/**
* annotation sets of the source document
*/
- private JComboBox srcAnnotationSets;
+ private JComboBox<String> srcAnnotationSets;
/**
* annotation sets of the target document
*/
- private JComboBox tgtAnnotationSets;
+ private JComboBox<String> tgtAnnotationSets;
/**
* source annotation set
@@ -399,17 +399,17 @@
*/
List<String> alignmentFeatureNames =
new ArrayList<String>(document.getAllAlignmentFeatureNames());
- this.alignmentFeatures = new JComboBox(alignmentFeatureNames.toArray());
+ this.alignmentFeatures = new
JComboBox<String>(alignmentFeatureNames.toArray(new
String[alignmentFeatureNames.size()]));
controls.add(new JLabel("Alignment Features:"));
controls.add(this.alignmentFeatures);
controls.add(new JLabel(" Source InputAS:"));
- this.srcAnnotationSets = new JComboBox(getASNames(srcDoc).toArray());
+ this.srcAnnotationSets = new JComboBox<String>(getASNames(srcDoc));
controls.add(this.srcAnnotationSets);
controls.add(new JLabel(" Target InputAS:"));
- this.tgtAnnotationSets = new JComboBox(getASNames(tgtDoc).toArray());
+ this.tgtAnnotationSets = new JComboBox<String>(getASNames(tgtDoc));
controls.add(this.tgtAnnotationSets);
refreshHighlights = new JButton("Go");
@@ -723,14 +723,14 @@
* @param document
* @return
*/
- private List<String> getASNames(Document document) {
+ private String[] getASNames(Document document) {
Set<String> setNames = document.getAnnotationSetNames();
List<String> setNamesList = null;
if(setNames == null)
setNamesList = new ArrayList<String>();
else setNamesList = new ArrayList<String>(setNames);
setNamesList.add(0, DEFAULT_AS_NAME);
- return setNamesList;
+ return setNamesList.toArray(new String[setNamesList.size()]);
}
private void initListeners() {
@@ -951,13 +951,13 @@
List<String> alignmentFeatureNames = new ArrayList<String>();
alignmentFeatureNames.addAll(document.getAllAlignmentFeatureNames());
- JComboBox dataSources = new JComboBox(alignmentFeatureNames.toArray());
+ JComboBox<String> dataSources = new
JComboBox<String>(alignmentFeatureNames.toArray(new
String[alignmentFeatureNames.size()]));
dataSources.setEditable(true);
- JComboBox storeAlignmentIn = new
JComboBox(alignmentFeatureNames.toArray());
+ JComboBox<String> storeAlignmentIn = new
JComboBox<String>(alignmentFeatureNames.toArray(new
String[alignmentFeatureNames.size()]));
storeAlignmentIn.setEditable(true);
- JComboBox viewsToSelectFrom = new JComboBox(VIEWS);
+ JComboBox<String> viewsToSelectFrom = new JComboBox<String>(VIEWS);
viewsToSelectFrom.setEditable(false);
final JTextField actionsFile = new JTextField("", 25);
@@ -1160,8 +1160,9 @@
private Document[] askForDocuments() {
JPanel mainPanel = new JPanel(new GridBagLayout());
// two combo-boxes
- JComboBox sourceDocs = new JComboBox(document.getDocumentIDs().toArray());
- JComboBox targetDocs = new JComboBox(document.getDocumentIDs().toArray());
+ List<String> docIDs = document.getDocumentIDs();
+ JComboBox<String> sourceDocs = new JComboBox<String>(docIDs.toArray(new
String[docIDs.size()]));
+ JComboBox<String> targetDocs = new JComboBox<String>(docIDs.toArray(new
String[docIDs.size()]));
GridBagConstraints constraints = new GridBagConstraints();
constraints.gridx = GridBagConstraints.RELATIVE;
@@ -1387,10 +1388,10 @@
final boolean reselect =
selectedFeature != null ? alignmentFeatureNames
.contains(selectedFeature) : false;
- DefaultComboBoxModel model =
- new DefaultComboBoxModel(alignmentFeatureNames.toArray());
+ DefaultComboBoxModel<String> model =
+ new DefaultComboBoxModel<String>(alignmentFeatureNames.toArray(new
String[alignmentFeatureNames.size()]));
if(this.alignmentFeatures == null) {
- this.alignmentFeatures = new JComboBox(model);
+ this.alignmentFeatures = new JComboBox<String>(model);
} else {
this.alignmentFeatures.setModel(model);
}
@@ -1419,7 +1420,7 @@
*/
public void annotationSetAdded(DocumentEvent e) {
Document doc = (Document)e.getSource();
- JComboBox comboBox = null;
+ JComboBox<String> comboBox = null;
if(srcDoc == doc) {
comboBox = this.srcAnnotationSets;
} else if(tgtDoc == doc) {
@@ -1438,11 +1439,11 @@
addedASName = DEFAULT_AS_NAME;
}
- DefaultComboBoxModel model = (DefaultComboBoxModel)comboBox.getModel();
+ DefaultComboBoxModel<String> model =
(DefaultComboBoxModel<String>)comboBox.getModel();
model.addElement(addedASName);
final String ASToReselect = selectedASName;
- final JComboBox finalComboBox = comboBox;
+ final JComboBox<String> finalComboBox = comboBox;
// update ui
SwingUtilities.invokeLater(new Runnable() {
@@ -1467,7 +1468,7 @@
*/
public void annotationSetRemoved(DocumentEvent e) {
Document doc = (Document)e.getSource();
- JComboBox comboBox = null;
+ JComboBox<String> comboBox = null;
if(srcDoc == doc) {
comboBox = this.srcAnnotationSets;
} else if(tgtDoc == doc) {
@@ -1486,12 +1487,12 @@
deletedASName = DEFAULT_AS_NAME;
}
- DefaultComboBoxModel model = (DefaultComboBoxModel)comboBox.getModel();
+ DefaultComboBoxModel<String> model =
(DefaultComboBoxModel<String>)comboBox.getModel();
model.removeElement(deletedASName);
final String ASToReselect =
selectedASName.equals(deletedASName) ? null : deletedASName;
- final JComboBox finalComboBox = comboBox;
+ final JComboBox<String> finalComboBox = comboBox;
// update ui
SwingUtilities.invokeLater(new Runnable() {
Modified:
gate/trunk/plugins/Alignment/src/gate/compound/gui/CompoundDocumentEditor.java
===================================================================
---
gate/trunk/plugins/Alignment/src/gate/compound/gui/CompoundDocumentEditor.java
2014-04-18 10:38:57 UTC (rev 17871)
+++
gate/trunk/plugins/Alignment/src/gate/compound/gui/CompoundDocumentEditor.java
2014-04-18 10:54:08 UTC (rev 17872)
@@ -194,7 +194,7 @@
docNames.add(doc.getName());
}
- JList docList = new JList(docNames);
+ JList<String> docList = new JList<String>(docNames);
JOptionPane dialog = new JOptionPane(new JScrollPane(docList),
JOptionPane.QUESTION_MESSAGE, JOptionPane.OK_CANCEL_OPTION);
dialog.createDialog(CompoundDocumentEditor.this,
@@ -369,7 +369,7 @@
public void actionPerformed(ActionEvent ae) {
CompoundDocument cd = (CompoundDocument)document;
List<String> docIDs = cd.getDocumentIDs();
- JComboBox box = new JComboBox(docIDs.toArray());
+ JComboBox<String> box = new JComboBox<String>(docIDs.toArray(new
String[docIDs.size()]));
Object[] options = {"OK", "CANCEL"};
int reply = JOptionPane.showOptionDialog(MainFrame.getInstance(), box,
"Select the document ID to switch to...",
Modified: gate/trunk/plugins/Gazetteer_LKB/.classpath
===================================================================
--- gate/trunk/plugins/Gazetteer_LKB/.classpath 2014-04-18 10:38:57 UTC (rev
17871)
+++ gate/trunk/plugins/Gazetteer_LKB/.classpath 2014-04-18 10:54:08 UTC (rev
17872)
@@ -10,7 +10,7 @@
<classpathentry exported="true" kind="lib"
path="lib/slf4j-api-1.5.11.jar"/>
<classpathentry exported="true" kind="lib"
path="lib/slf4j-log4j12-1.5.11.jar"/>
<classpathentry exported="true" kind="lib"
path="lib/trove4j-2.0.2.jar"/>
- <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/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry combineaccessrules="false" exported="true" kind="src"
path="/GATE"/>
<classpathentry kind="lib" path="lib/openrdf-sesame-2.7.9-onejar.jar"/>
<classpathentry kind="lib" path="lib/owlim-lite-5.4.jar"/>
Modified: gate/trunk/plugins/Gazetteer_LKB/build.xml
===================================================================
--- gate/trunk/plugins/Gazetteer_LKB/build.xml 2014-04-18 10:38:57 UTC (rev
17871)
+++ gate/trunk/plugins/Gazetteer_LKB/build.xml 2014-04-18 10:54:08 UTC (rev
17872)
@@ -86,8 +86,8 @@
destdir="${classes.dir}"
debug="true"
debuglevel="lines,source"
- source="1.6"
- target="1.6">
+ source="1.7"
+ target="1.7">
<compilerarg value="-Xmaxwarns" />
<compilerarg value="${gate.compile.maxwarnings}" />
<compilerarg value="-Xlint:all" />
@@ -128,11 +128,11 @@
classpathref="compile.classpath"
encoding="UTF-8"
windowtitle="${plugin.name} JavaDoc"
- source="1.6">
+ source="1.7">
<sourcepath>
<pathelement location="${src.dir}" />
</sourcepath>
- <link href="http://docs.oracle.com/javase/6/docs/api/" />
+ <link href="http://docs.oracle.com/javase/7/docs/api/" />
<link href="http://gate.ac.uk/gate/doc/javadoc/" />
</javadoc>
</target>
Modified: gate/trunk/plugins/JAPE_Plus/.classpath
===================================================================
--- gate/trunk/plugins/JAPE_Plus/.classpath 2014-04-18 10:38:57 UTC (rev
17871)
+++ gate/trunk/plugins/JAPE_Plus/.classpath 2014-04-18 10:54:08 UTC (rev
17872)
@@ -2,7 +2,7 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry exported="true" kind="lib"
path="lib/colt-1.2.0-free.jar" sourcepath="lib/src/colt-1.2.0-free-src.jar"/>
- <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/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry combineaccessrules="false" exported="true" kind="src"
path="/GATE"/>
<classpathentry kind="output" path="classes"/>
</classpath>
Modified: gate/trunk/plugins/JAPE_Plus/build.xml
===================================================================
--- gate/trunk/plugins/JAPE_Plus/build.xml 2014-04-18 10:38:57 UTC (rev
17871)
+++ gate/trunk/plugins/JAPE_Plus/build.xml 2014-04-18 10:54:08 UTC (rev
17872)
@@ -48,7 +48,7 @@
debug="true"
debuglevel="lines,source"
encoding="UTF-8"
- source="1.6" target="1.6">
+ source="1.7" target="1.7">
<compilerarg value="-Xmaxwarns" />
<compilerarg value="${gate.compile.maxwarnings}" />
<compilerarg value="-Xlint:all" />
@@ -82,11 +82,11 @@
classpathref="compile.classpath"
encoding="UTF-8"
windowtitle="${plugin.name} JavaDoc"
- source="1.6">
+ source="1.7">
<sourcepath>
<pathelement location="${src.dir}" />
</sourcepath>
- <link href="http://docs.oracle.com/javase/6/docs/api/" />
+ <link href="http://docs.oracle.com/javase/7/docs/api/" />
<link href="http://gate.ac.uk/gate/doc/javadoc/" />
</javadoc>
</target>
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs