cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From and...@apache.org
Subject svn commit: r713318 - in /cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne: modeler/ modeler/dialog/codegen/ modeler/dialog/datamap/ modeler/dialog/objentity/ modeler/dialog/pref/ modeler/editor/ modeler/editor/datanode/ sw...
Date Wed, 12 Nov 2008 08:46:05 GMT
Author: andrey
Date: Wed Nov 12 00:46:01 2008
New Revision: 713318

URL: http://svn.apache.org/viewvc?rev=713318&view=rev
Log:
Removed unused importes & fixed some deprecations

Modified:
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/Application.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/FileClassLoadingService.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/ProjectController.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/codegen/CodeGeneratorController.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/datamap/LockingUpdateController.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/objentity/ObjRelationshipInfoModel.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/pref/GeneralPreferences.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/EditorView.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/datanode/DataNodeEditor.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/datanode/JDBCDataSourceEditor.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/datanode/JDBCDataSourceView.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/datanode/MainDataNodeEditor.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/datanode/PasswordEncoderView.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/swing/CheckBoxBinding.java

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/Application.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/Application.java?rev=713318&r1=713317&r2=713318&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/Application.java
(original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/Application.java
Wed Nov 12 00:46:01 2008
@@ -19,11 +19,26 @@
 
 package org.apache.cayenne.modeler;
 
+import java.awt.Dialog;
+import java.awt.Frame;
+import java.awt.Window;
+import java.io.File;
+import java.util.Collection;
+
+import javax.swing.JFrame;
+import javax.swing.JOptionPane;
+import javax.swing.JRootPane;
+import javax.swing.SwingUtilities;
+
 import org.apache.cayenne.modeler.dialog.LogConsole;
 import org.apache.cayenne.modeler.util.AdapterMapping;
 import org.apache.cayenne.modeler.util.CayenneAction;
 import org.apache.cayenne.modeler.util.CayenneDialog;
-import org.apache.cayenne.pref.*;
+import org.apache.cayenne.pref.Domain;
+import org.apache.cayenne.pref.DomainPreference;
+import org.apache.cayenne.pref.HSQLEmbeddedPreferenceEditor;
+import org.apache.cayenne.pref.HSQLEmbeddedPreferenceService;
+import org.apache.cayenne.pref.PreferenceService;
 import org.apache.cayenne.project.CayenneUserDir;
 import org.apache.cayenne.project.Project;
 import org.apache.cayenne.swing.BindingFactory;
@@ -35,11 +50,6 @@
 import org.scopemvc.util.UIStrings;
 import org.scopemvc.view.swing.SwingView;
 
-import javax.swing.*;
-import java.awt.*;
-import java.io.File;
-import java.util.Collection;
-
 /**
  * A main modeler application class that provides a number of services to the Modeler
  * components. Configuration properties:
@@ -210,6 +220,7 @@
     /**
      * Reinitializes ModelerClassLoader from preferences.
      */
+    @SuppressWarnings("unchecked")
     public void initClassLoader() {
         final FileClassLoadingService classLoader = new FileClassLoadingService();
 

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/FileClassLoadingService.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/FileClassLoadingService.java?rev=713318&r1=713317&r2=713318&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/FileClassLoadingService.java
(original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/FileClassLoadingService.java
Wed Nov 12 00:46:01 2008
@@ -37,10 +37,10 @@
 public class FileClassLoadingService implements ClassLoadingService {
 
     private FileClassLoader classLoader;
-    protected List pathFiles;
+    protected List<File> pathFiles;
 
     public FileClassLoadingService() {
-        this.pathFiles = new ArrayList(15);
+        this.pathFiles = new ArrayList<File>(15);
     }
 
     /**
@@ -60,11 +60,11 @@
     /**
      * Returns an unmodifiable list of configured CLASSPATH locations.
      */
-    public synchronized List getPathFiles() {
+    public synchronized List<File> getPathFiles() {
         return Collections.unmodifiableList(pathFiles);
     }
 
-    public synchronized void setPathFiles(Collection files) {
+    public synchronized void setPathFiles(Collection<File> files) {
 
         pathFiles.clear();
         classLoader = null;
@@ -87,7 +87,7 @@
 
         if (classLoader != null) {
             try {
-                classLoader.addURL(file.toURL());
+                classLoader.addURL(file.toURI().toURL());
             }
             catch (MalformedURLException ex) {
                 return;
@@ -122,7 +122,7 @@
 
                 // I guess here we have to quetly ignore invalid URLs...
                 try {
-                    addURL(file.toURL());
+                    addURL(file.toURI().toURL());
                 }
                 catch (MalformedURLException ex) {
                 }

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/ProjectController.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/ProjectController.java?rev=713318&r1=713317&r2=713318&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/ProjectController.java
(original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/ProjectController.java
Wed Nov 12 00:46:01 2008
@@ -469,7 +469,7 @@
 
         synchronized (controllerStateHistory) {
             int count = controllerStateHistory.size();
-            ArrayList removeList = new ArrayList();
+            List<Object> removeList = new ArrayList<Object>();
 
             for (int i = 0; i < count; i++) {
                 ControllerState cs = (ControllerState) controllerStateHistory.get(i);
@@ -1671,6 +1671,7 @@
     /**
      * Returns currently selected object, null if there are none, List if there are several
      */
+    @SuppressWarnings("unchecked")
     public Object getCurrentObject() {
         if (getCurrentObjEntity() != null) {
             return getCurrentObjEntity();

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/codegen/CodeGeneratorController.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/codegen/CodeGeneratorController.java?rev=713318&r1=713317&r2=713318&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/codegen/CodeGeneratorController.java
(original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/codegen/CodeGeneratorController.java
Wed Nov 12 00:46:01 2008
@@ -19,6 +19,10 @@
 
 package org.apache.cayenne.modeler.dialog.codegen;
 
+import java.awt.Component;
+
+import javax.swing.JOptionPane;
+
 import org.apache.cayenne.gen.ClassGenerationAction;
 import org.apache.cayenne.map.DataMap;
 import org.apache.cayenne.modeler.dialog.ErrorDebugDialog;
@@ -29,9 +33,6 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
-import javax.swing.*;
-import java.awt.*;
-
 /**
  * A controller for the class generator dialog.
  * 
@@ -71,7 +72,7 @@
         view.setModal(true);
         centerView();
         makeCloseableOnEscape();
-        view.show();
+        view.setVisible(true);
     }
 
     protected void initBindings() {

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/datamap/LockingUpdateController.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/datamap/LockingUpdateController.java?rev=713318&r1=713317&r2=713318&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/datamap/LockingUpdateController.java
(original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/datamap/LockingUpdateController.java
Wed Nov 12 00:46:01 2008
@@ -56,7 +56,7 @@
         view.setModal(true);
         centerView();
         makeCloseableOnEscape();
-        view.show();
+        view.setVisible(true);
     }
 
     public Component getView() {

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/objentity/ObjRelationshipInfoModel.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/objentity/ObjRelationshipInfoModel.java?rev=713318&r1=713317&r2=713318&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/objentity/ObjRelationshipInfoModel.java
(original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/objentity/ObjRelationshipInfoModel.java
Wed Nov 12 00:46:01 2008
@@ -101,6 +101,7 @@
     protected DbEntity newRelTarget;
     protected List<DbEntity> newRelTargets;
 
+    @SuppressWarnings("unchecked")
     public ObjRelationshipInfoModel(ObjRelationship relationship) {
 
         this.relationship = relationship;

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/pref/GeneralPreferences.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/pref/GeneralPreferences.java?rev=713318&r1=713317&r2=713318&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/pref/GeneralPreferences.java
(original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/pref/GeneralPreferences.java
Wed Nov 12 00:46:01 2008
@@ -23,7 +23,6 @@
 
 import org.apache.cayenne.gen.ClassGenerationAction;
 import org.apache.cayenne.modeler.util.CayenneController;
-import org.apache.cayenne.modeler.Application;
 import org.apache.cayenne.pref.CayennePreferenceEditor;
 import org.apache.cayenne.pref.CayennePreferenceService;
 import org.apache.cayenne.pref.Domain;

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/EditorView.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/EditorView.java?rev=713318&r1=713317&r2=713318&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/EditorView.java
(original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/EditorView.java
Wed Nov 12 00:46:01 2008
@@ -28,7 +28,6 @@
 import javax.swing.JPanel;
 import javax.swing.JScrollPane;
 import javax.swing.JSplitPane;
-import javax.swing.JTabbedPane;
 
 import org.apache.cayenne.modeler.ProjectController;
 import org.apache.cayenne.modeler.ProjectTreeView;

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/datanode/DataNodeEditor.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/datanode/DataNodeEditor.java?rev=713318&r1=713317&r2=713318&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/datanode/DataNodeEditor.java
(original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/datanode/DataNodeEditor.java
Wed Nov 12 00:46:01 2008
@@ -23,7 +23,6 @@
 
 import javax.swing.JScrollPane;
 import javax.swing.JTabbedPane;
-import javax.swing.text.StyledEditorKit.BoldAction;
 
 import org.apache.cayenne.modeler.ProjectController;
 import org.apache.cayenne.modeler.util.CayenneController;

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/datanode/JDBCDataSourceEditor.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/datanode/JDBCDataSourceEditor.java?rev=713318&r1=713317&r2=713318&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/datanode/JDBCDataSourceEditor.java
(original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/datanode/JDBCDataSourceEditor.java
Wed Nov 12 00:46:01 2008
@@ -21,9 +21,6 @@
 
 import java.awt.Component;
 
-import javax.swing.JOptionPane;
-
-import org.apache.cayenne.conn.DataSourceInfo;
 import org.apache.cayenne.modeler.CayenneModelerController;
 import org.apache.cayenne.modeler.ProjectController;
 import org.apache.cayenne.modeler.pref.DBConnectionInfo;
@@ -32,8 +29,6 @@
 import org.apache.cayenne.swing.BindingDelegate;
 import org.apache.cayenne.swing.ObjectBinding;
 
-/**
- */
 public class JDBCDataSourceEditor extends DataSourceEditor {
 
     protected JDBCDataSourceView view;

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/datanode/JDBCDataSourceView.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/datanode/JDBCDataSourceView.java?rev=713318&r1=713317&r2=713318&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/datanode/JDBCDataSourceView.java
(original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/datanode/JDBCDataSourceView.java
Wed Nov 12 00:46:01 2008
@@ -20,30 +20,16 @@
 package org.apache.cayenne.modeler.editor.datanode;
 
 import java.awt.BorderLayout;
-import java.awt.Component;
-import java.util.Map;
-import java.util.TreeMap;
 
-import javax.swing.DefaultComboBoxModel;
-import javax.swing.DefaultListCellRenderer;
 import javax.swing.JButton;
-import javax.swing.JComboBox;
-import javax.swing.JLabel;
-import javax.swing.JList;
 import javax.swing.JPanel;
 import javax.swing.JPasswordField;
 import javax.swing.JTextField;
 
-import org.apache.cayenne.conf.PasswordEncoding;
-import org.apache.cayenne.conn.DataSourceInfo;
-import org.apache.cayenne.modeler.util.CayenneWidgetFactory;
-
 import com.jgoodies.forms.builder.PanelBuilder;
 import com.jgoodies.forms.layout.CellConstraints;
 import com.jgoodies.forms.layout.FormLayout;
 
-/**
- */
 public class JDBCDataSourceView extends JPanel {
 
     protected JTextField     driver;

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/datanode/MainDataNodeEditor.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/datanode/MainDataNodeEditor.java?rev=713318&r1=713317&r2=713318&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/datanode/MainDataNodeEditor.java
(original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/datanode/MainDataNodeEditor.java
Wed Nov 12 00:46:01 2008
@@ -28,8 +28,6 @@
 import java.util.Map;
 
 import javax.swing.DefaultComboBoxModel;
-import javax.swing.JOptionPane;
-import javax.swing.JTabbedPane;
 
 import org.apache.cayenne.access.DataDomain;
 import org.apache.cayenne.access.DataNode;
@@ -40,7 +38,6 @@
 import org.apache.cayenne.map.event.DataNodeEvent;
 import org.apache.cayenne.modeler.ProjectController;
 import org.apache.cayenne.modeler.dialog.pref.PreferenceDialog;
-import org.apache.cayenne.modeler.editor.EditorView;
 import org.apache.cayenne.modeler.event.DataNodeDisplayEvent;
 import org.apache.cayenne.modeler.event.DataNodeDisplayListener;
 import org.apache.cayenne.modeler.pref.DBConnectionInfo;

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/datanode/PasswordEncoderView.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/datanode/PasswordEncoderView.java?rev=713318&r1=713317&r2=713318&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/datanode/PasswordEncoderView.java
(original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/editor/datanode/PasswordEncoderView.java
Wed Nov 12 00:46:01 2008
@@ -35,7 +35,6 @@
 import org.apache.cayenne.conn.DataSourceInfo;
 import org.apache.cayenne.modeler.util.CayenneWidgetFactory;
 
-import com.jgoodies.forms.builder.DefaultFormBuilder;
 import com.jgoodies.forms.builder.PanelBuilder;
 import com.jgoodies.forms.layout.CellConstraints;
 import com.jgoodies.forms.layout.FormLayout;

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/swing/CheckBoxBinding.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/swing/CheckBoxBinding.java?rev=713318&r1=713317&r2=713318&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/swing/CheckBoxBinding.java
(original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/swing/CheckBoxBinding.java
Wed Nov 12 00:46:01 2008
@@ -1,11 +1,10 @@
 package org.apache.cayenne.swing;
 
-import org.apache.cayenne.validation.ValidationException;
-
-import javax.swing.*;
-import java.awt.*;
-import java.awt.event.ActionListener;
+import java.awt.Component;
 import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.JCheckBox;
 
 /**
  * A generic adapter that binds a check box to a bean property.



Mime
View raw message