Author: jfuerth
Date: Fri Oct 17 12:02:06 2008
New Revision: 2791

Modified:
   trunk/src/ca/sqlpower/architect/SQLDatabase.java
   trunk/src/ca/sqlpower/architect/swingui/PlayPen.java
   trunk/src/ca/sqlpower/architect/swingui/dbtree/DBTreeCellRenderer.java
   trunk/src/ca/sqlpower/architect/swingui/messages.properties

Log:
Removed the messages from the tree cell renderer as they were unnecessary and were tying the DBTree module to the

Modified: trunk/src/ca/sqlpower/architect/SQLDatabase.java
==============================================================================
--- trunk/src/ca/sqlpower/architect/SQLDatabase.java    (original)
+++ trunk/src/ca/sqlpower/architect/SQLDatabase.java Fri Oct 17 12:02:06 2008
@@ -325,10 +325,12 @@

        @Override
        public String getName() {
-               if (dataSource != null) {
-                       return dataSource.getDisplayName();
-               } else {
+               if (isPlayPenDatabase()) {
                        return "PlayPen Database";
+               } else if (dataSource != null) {
+                   return dataSource.getDisplayName();
+               } else {
+                   return "Disconnected";
                }
        }
        /**

Modified: trunk/src/ca/sqlpower/architect/swingui/PlayPen.java
==============================================================================
--- trunk/src/ca/sqlpower/architect/swingui/PlayPen.java        (original)
+++ trunk/src/ca/sqlpower/architect/swingui/PlayPen.java Fri Oct 17 12:02:06 2008
@@ -482,8 +482,6 @@
                newdb.setPlayPenDatabase(true);

                SPDataSource dbcs = new 
SPDataSource(session.getContext().getPlDotIni());
- dbcs.setName(Messages.getString("PlayPen.notConfiguredDbcsName")); //$NON-NLS-1$ - dbcs.setDisplayName(Messages.getString("PlayPen.notConfiguredDbcsName")); //$NON-NLS-1$
         newdb.setDataSource(dbcs);

                try {

Modified: trunk/src/ca/sqlpower/architect/swingui/dbtree/DBTreeCellRenderer.java
==============================================================================
--- trunk/src/ca/sqlpower/architect/swingui/dbtree/DBTreeCellRenderer.java (original) +++ trunk/src/ca/sqlpower/architect/swingui/dbtree/DBTreeCellRenderer.java Fri Oct 17 12:02:06 2008
@@ -38,7 +38,6 @@
 import ca.sqlpower.architect.SQLSchema;
 import ca.sqlpower.architect.SQLTable;
 import ca.sqlpower.architect.SQLIndex.Column;
-import ca.sqlpower.architect.swingui.Messages;

 /**
  * The DBTreeCellRenderer renders nodes of a JTree which are of
@@ -83,7 +82,6 @@
                        SQLDatabase db = (SQLDatabase) value;
                        if (db.isPlayPenDatabase()) {
                                setIcon(TARGET_DB_ICON);
- setText(Messages.getString("DBTreeCellRenderer.playpenNodeText")); //$NON-NLS-1$
                        } else {
                                setIcon(DB_ICON);
                        }

Modified: trunk/src/ca/sqlpower/architect/swingui/messages.properties
==============================================================================
--- trunk/src/ca/sqlpower/architect/swingui/messages.properties (original)
+++ trunk/src/ca/sqlpower/architect/swingui/messages.properties Fri Oct 17 12:02:06 2008
@@ -155,7 +155,6 @@
 DBTree.setAsTargetDbActionName=Set As Target Database
 DBTree.showExceptionDetails=Show Exception Details
 DBTree.showInPlaypenAction=Show in Playpen
-DBTreeCellRenderer.playpenNodeText=Project
DDLExportPanel.couldNotCreateDdlGenerator=Couldn't create a DDL generator of the selected type
 DDLExportPanel.createInLabel=Create in:
 DDLExportPanel.generateDDLForDbType=Generate DDL for Database Type:
@@ -210,7 +209,6 @@
 PlayPen.copyingObjectsToThePlaypen=Copying objects to the playpen
PlayPen.noObjectsToImportFound=Could not find any objects to add to the PlayPen.
 PlayPen.noObjectsToImportFoundDialogTitle=No objects added
-PlayPen.notConfiguredDbcsName=Not Configured
 PlayPen.okOption=OK
 PlayPen.sendToBackActionName=Send to Back
PlayPen.straightenLinesActionDescription=Straighten Relationship Lines Where Possible

Reply via email to