Revision: 15055
http://gate.svn.sourceforge.net/gate/?rev=15055&view=rev
Author: markagreenwood
Date: 2012-01-15 18:56:34 +0000 (Sun, 15 Jan 2012)
Log Message:
-----------
removing some Actions that have been replaced with newer versions or which are
no longer used
Modified Paths:
--------------
gate/trunk/src/gate/gui/MainFrame.java
gate/trunk/src/gate/gui/NameBearerHandle.java
Modified: gate/trunk/src/gate/gui/MainFrame.java
===================================================================
--- gate/trunk/src/gate/gui/MainFrame.java 2012-01-15 17:40:25 UTC (rev
15054)
+++ gate/trunk/src/gate/gui/MainFrame.java 2012-01-15 18:56:34 UTC (rev
15055)
@@ -2783,87 +2783,6 @@
}
}
- /**
- * TODO: delete this method as it has moved to PluginManagerUI
- * @deprecated
- */
- class LoadCreoleRepositoryAction extends AbstractAction {
- private static final long serialVersionUID = 1L;
- public LoadCreoleRepositoryAction() {
- super("Load a CREOLE Repository");
- }
-
- public void actionPerformed(ActionEvent e) {
- Box messageBox = Box.createHorizontalBox();
- Box leftBox = Box.createVerticalBox();
- JTextField urlTextField = new JTextField(20);
- leftBox.add(new JLabel("Type an URL"));
- leftBox.add(urlTextField);
- messageBox.add(leftBox);
-
- messageBox.add(Box.createHorizontalStrut(10));
- messageBox.add(new JLabel("or"));
- messageBox.add(Box.createHorizontalStrut(10));
-
- class URLfromFileAction extends AbstractAction {
- private static final long serialVersionUID = 1L;
- URLfromFileAction(JTextField textField) {
- super(null, getIcon("open-file"));
- putValue(SHORT_DESCRIPTION, "Click to select a directory");
- this.textField = textField;
- }
-
- public void actionPerformed(ActionEvent e) {
- fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
- fileChooser.setFileFilter(fileChooser.getAcceptAllFileFilter());
- fileChooser.setResource("gate.CreoleRegister");
- int result = fileChooser.showOpenDialog(MainFrame.this);
- if(result == JFileChooser.APPROVE_OPTION) {
- try {
- textField.setText(fileChooser.getSelectedFile().toURI().toURL()
- .toExternalForm());
- }
- catch(MalformedURLException mue) {
- throw new GateRuntimeException(mue.toString());
- }
- }
- }
-
- JTextField textField;
- } // class URLfromFileAction extends AbstractAction
-
- Box rightBox = Box.createVerticalBox();
- rightBox.add(new JLabel("Select a directory"));
- JButton fileBtn = new JButton(new URLfromFileAction(urlTextField));
- rightBox.add(fileBtn);
- messageBox.add(rightBox);
-
- // JOptionPane.showInputDialog(
- // MainFrame.this,
- // "Select type of Datastore",
- // "Gate", JOptionPane.QUESTION_MESSAGE,
- // null, names,
- // names[0]);
-
- int res =
- JOptionPane.showConfirmDialog(MainFrame.this, messageBox,
- "Enter an URL to the directory containig the "
- + "\"creole.xml\" file", JOptionPane.OK_CANCEL_OPTION,
- JOptionPane.QUESTION_MESSAGE, null);
- if(res == JOptionPane.OK_OPTION) {
- try {
- URL creoleURL = new URL(urlTextField.getText());
- Gate.getCreoleRegister().registerDirectories(creoleURL);
- }
- catch(Exception error) {
- String message =
- "There was a problem when registering your CREOLE directory.";
- log.error(message, error);
- }
- }
- }
- }// class LoadCreoleRepositoryAction extends AbstractAction
-
class NewResourceAction extends AbstractAction {
private static final long serialVersionUID = 1L;
/** Used for creation of resource menu item and creation dialog */
@@ -5149,45 +5068,4 @@
JRadioButtonMenuItem me;
}// //class LocaleSelectorMenuItem extends JRadioButtonMenuItem
- /**
- * This class represent an action which brings up the Gazetteer Editor
- * tool
- */
- class NewGazetteerEditorAction extends AbstractAction {
- private static final long serialVersionUID = 1L;
- public NewGazetteerEditorAction() {
- super("Gazetteer Editor", getIcon("gazetteer"));
- putValue(SHORT_DESCRIPTION, "Start the Gazetteer Editor");
- }
-
- public void actionPerformed(ActionEvent e) {
- com.ontotext.gate.vr.Gaze editor = new com.ontotext.gate.vr.Gaze();
- try {
- JFrame frame = new JFrame();
- editor.init();
- frame.setTitle("Gazetteer Editor");
- frame.getContentPane().add(editor);
-
- Set<LanguageResource> gazetteers = new HashSet<LanguageResource>(
- Gate.getCreoleRegister().getLrInstances(
- "gate.creole.gazetteer.DefaultGazetteer"));
- if(gazetteers.isEmpty()) { return; }
- for(LanguageResource gazetteer : gazetteers) {
- Gazetteer gaz = (Gazetteer) gazetteer;
- if(gaz.getListsURL().toString().endsWith(
- System.getProperty("gate.slug.gazetteer"))) editor.setTarget(gaz);
- }
-
- frame.setSize(Gaze.SIZE_X, Gaze.SIZE_Y);
- frame.setLocation(Gaze.POSITION_X, Gaze.POSITION_Y);
- frame.setVisible(true);
- editor.setVisible(true);
- }
- catch(ResourceInstantiationException error) {
- String message = "Failed to instanciate the gazetteer editor.";
- log.error(message, error);
- }
- }// actionPerformed();
- }// class NewOntologyEditorAction
-
} // class MainFrame
Modified: gate/trunk/src/gate/gui/NameBearerHandle.java
===================================================================
--- gate/trunk/src/gate/gui/NameBearerHandle.java 2012-01-15 17:40:25 UTC
(rev 15054)
+++ gate/trunk/src/gate/gui/NameBearerHandle.java 2012-01-15 18:56:34 UTC
(rev 15055)
@@ -842,43 +842,6 @@
}// public void actionPerformed(ActionEvent e)
}// class SaveCorpusAsXmlAction extends AbstractAction
- /**
- * Saves a corpus as a set of xml files in a directory.
- */
- class ReloadClassAction extends AbstractAction {
- private static final long serialVersionUID = 1L;
-
- public ReloadClassAction() {
- super("Reload Resource Class");
- putValue(SHORT_DESCRIPTION, "Reloads the java class for this resource");
- }
-
- public void actionPerformed(ActionEvent e) {
- int answer = JOptionPane.showOptionDialog(largeView != null
- ? largeView
- : smallView, "This is an advanced option!\n"
- + "You should not use this unless your name is Hamish.\n"
- + "Are you sure you want to do this?", "GATE",
- JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE, null,
- null, null);
- if(answer == JOptionPane.OK_OPTION) {
- try {
- String className = target.getClass().getName();
- Gate.getClassLoader().reloadClass(className);
- fireStatusChanged("Class " + className + " reloaded!");
- }
- catch(Exception ex) {
- JOptionPane.showMessageDialog(largeView != null
- ? largeView
- : smallView, "Look what you've done: \n" + ex.toString()
- + "\nI told you not to do it...", "GATE",
- JOptionPane.ERROR_MESSAGE);
- ex.printStackTrace(Err.getPrintWriter());
- }
- }
- }
- }
-
class MakeConditionalAction extends AbstractAction {
private static final long serialVersionUID = 1L;
@@ -1668,26 +1631,6 @@
}
}
- class CreateIndexAction1 extends AbstractAction {
- private static final long serialVersionUID = -3951091972912846869L;
-
- CreateIndexAction1() {
- super("Create Index");
- putValue(SHORT_DESCRIPTION, "Create index with documents from a corpus");
- }
-
- public void actionPerformed(ActionEvent e) {
- CreateIndexDialog cid = null;
- if(getWindow() instanceof Frame) {
- cid = new CreateIndexDialog((Frame)getWindow(), (IndexedCorpus)target);
- }
- if(getWindow() instanceof Dialog) {
- cid = new CreateIndexDialog((Dialog)getWindow(),
(IndexedCorpus)target);
- }
- cid.setVisible(true);
- }
- }
-
class CreateIndexAction extends AbstractAction {
private static final long serialVersionUID = -292879296310753260L;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
RSA(R) Conference 2012
Mar 27 - Feb 2
Save $400 by Jan. 27
Register now!
http://p.sf.net/sfu/rsa-sfdev2dev2
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs