[jboss-cvs] jbosside/netbeans/hibernate-console/src/org/hibernate/netbeans/console ...
Leon Chiver
leonceeo at gmail.com
Tue Sep 19 15:29:06 EDT 2006
User: leonceeo
Date: 06/09/19 15:29:06
Modified: netbeans/hibernate-console/src/org/hibernate/netbeans/console
Tag: v_0_5_alpha1 SessionFactoryDescriptor.java
SessionFactoryConfigurationPanel.form
SessionFactoryConfigurationPanel.java
Bundle.properties layer.xml
Log:
merged changes from trunk (as they were meant for the 0.5 release)
Revision Changes Path
No revision
No revision
1.7.2.1 +3 -1 jbosside/netbeans/hibernate-console/src/org/hibernate/netbeans/console/SessionFactoryDescriptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: SessionFactoryDescriptor.java
===================================================================
RCS file: /cvsroot/jboss/jbosside/netbeans/hibernate-console/src/org/hibernate/netbeans/console/SessionFactoryDescriptor.java,v
retrieving revision 1.7
retrieving revision 1.7.2.1
diff -u -b -r1.7 -r1.7.2.1
--- SessionFactoryDescriptor.java 4 Jul 2006 09:48:30 -0000 1.7
+++ SessionFactoryDescriptor.java 19 Sep 2006 19:29:06 -0000 1.7.2.1
@@ -146,6 +146,8 @@
private Properties extraProperties;
+ private File configurationFile;
+
private static FileObject ensureFolderExists() throws Exception {
FileSystem fs = Repository.getDefault().getDefaultFileSystem();
FileObject folder = fs.findResource(SESSION_FACTORIES_FOLDER);
@@ -469,7 +471,7 @@
Configuration cfg = (Configuration) clazz.newInstance();
cfg.setProperties(props);
for (File f : getMappingFiles(ph)) {
- ph.progress("Adding mapping file " + f.getAbsolutePath());
+ ph.progress("Adding mapping file " + f.getName() + " from " + f.getParentFile().getAbsolutePath());
cfg.addFile(f);
}
return cfg;
1.1.4.1 +58 -23 jbosside/netbeans/hibernate-console/src/org/hibernate/netbeans/console/SessionFactoryConfigurationPanel.form
(In the diff below, changes in quantity of whitespace are not shown.)
Index: SessionFactoryConfigurationPanel.form
===================================================================
RCS file: /cvsroot/jboss/jbosside/netbeans/hibernate-console/src/org/hibernate/netbeans/console/SessionFactoryConfigurationPanel.form,v
retrieving revision 1.1
retrieving revision 1.1.4.1
diff -u -b -r1.1 -r1.1.4.1
--- SessionFactoryConfigurationPanel.form 8 May 2006 09:32:44 -0000 1.1
+++ SessionFactoryConfigurationPanel.form 19 Sep 2006 19:29:06 -0000 1.1.4.1
@@ -2,8 +2,8 @@
<Form version="1.3" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
<AuxValues>
- <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
- <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
+ <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="2"/>
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
@@ -14,19 +14,26 @@
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
- <EmptySpace min="-2" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="mappingLocationsLabel" alignment="0" min="-2" max="-2" attributes="0"/>
- <Group type="102" alignment="1" attributes="0">
+ <Group type="102" alignment="0" attributes="0">
<Group type="103" groupAlignment="0" attributes="0">
- <Component id="classPathScrollPane" pref="374" max="32767" attributes="0"/>
- <Component id="mappingLocationsScrollPane" alignment="1" pref="374" max="32767" attributes="0"/>
+ <Component id="classPathScrollPane" pref="379" max="32767" attributes="0"/>
+ <Group type="102" alignment="0" attributes="0">
+ <Component id="classPathLabel" min="-2" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="jLabel1" min="-2" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="jLabel2" min="-2" max="-2" attributes="0"/>
+ </Group>
+ <Component id="mappingLocationsScrollPane" alignment="1" pref="379" max="32767" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<Component id="nameLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
- <Component id="nameField" pref="276" max="32767" attributes="0"/>
+ <Component id="nameField" pref="281" max="32767" attributes="0"/>
</Group>
- <Component id="extraConfigurationTabbedPane" alignment="0" pref="374" max="32767" attributes="0"/>
+ <Component id="extraConfigurationTabbedPane" alignment="0" pref="379" max="32767" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
@@ -42,7 +49,6 @@
</Group>
</Group>
</Group>
- <Component id="classPathLabel" alignment="0" min="-2" max="-2" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
</Group>
@@ -69,15 +75,20 @@
<EmptySpace max="-2" attributes="0"/>
<Component id="downMappingLocationButton" min="-2" max="-2" attributes="0"/>
</Group>
- <Component id="mappingLocationsScrollPane" alignment="0" max="32767" attributes="0"/>
+ <Component id="mappingLocationsScrollPane" alignment="0" pref="139" max="32767" attributes="0"/>
</Group>
<EmptySpace min="-2" max="-2" attributes="0"/>
- <Component id="classPathLabel" min="-2" max="-2" attributes="0"/>
+ <Group type="103" groupAlignment="3" attributes="0">
+ <Component id="classPathLabel" alignment="3" min="-2" max="-2" attributes="0"/>
+ <Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
+ <Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
+ </Group>
<EmptySpace min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
- <Group type="102" attributes="0">
- <Component id="classPathScrollPane" max="32767" attributes="0"/>
- <EmptySpace max="-2" attributes="0"/>
+ <Group type="102" alignment="1" attributes="0">
+ <EmptySpace min="-2" max="-2" attributes="0"/>
+ <Component id="classPathScrollPane" pref="139" max="32767" attributes="0"/>
+ <EmptySpace min="-2" max="-2" attributes="0"/>
<Component id="extraConfigurationTabbedPane" min="-2" pref="180" max="-2" attributes="0"/>
</Group>
<Group type="102" attributes="0">
@@ -90,7 +101,7 @@
<Component id="downClassPathButton" min="-2" max="-2" attributes="0"/>
</Group>
</Group>
- <EmptySpace max="-2" attributes="0"/>
+ <EmptySpace min="-2" max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
@@ -308,11 +319,11 @@
</Group>
<EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
- <Component id="dialectComboBox" pref="226" max="32767" attributes="0"/>
- <Component id="driverComboBox" pref="226" max="32767" attributes="0"/>
- <Component id="userField" alignment="0" pref="226" max="32767" attributes="0"/>
- <Component id="connectionUrlCombo" alignment="0" pref="226" max="32767" attributes="0"/>
- <Component id="passwordField" alignment="0" pref="226" max="32767" attributes="0"/>
+ <Component id="dialectComboBox" pref="231" max="32767" attributes="0"/>
+ <Component id="driverComboBox" pref="231" max="32767" attributes="0"/>
+ <Component id="userField" alignment="0" pref="231" max="32767" attributes="0"/>
+ <Component id="connectionUrlCombo" alignment="0" pref="231" max="32767" attributes="0"/>
+ <Component id="passwordField" alignment="0" pref="231" max="32767" attributes="0"/>
</Group>
<EmptySpace max="-2" attributes="0"/>
</Group>
@@ -346,7 +357,7 @@
<Component id="passwordLabel" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="passwordField" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
- <EmptySpace min="-2" pref="11" max="-2" attributes="0"/>
+ <EmptySpace min="-2" max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
@@ -409,6 +420,9 @@
</AuxValues>
</Component>
<Component class="javax.swing.JComboBox" name="dialectComboBox">
+ <Properties>
+ <Property name="editable" type="boolean" value="true"/>
+ </Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="dialectComboBoxActionPerformed"/>
</Events>
@@ -451,7 +465,7 @@
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
- <Component id="propertiesScrollPane" pref="345" max="32767" attributes="0"/>
+ <Component id="propertiesScrollPane" pref="350" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
@@ -500,7 +514,7 @@
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
- <Component id="importsScrollPane" pref="345" max="32767" attributes="0"/>
+ <Component id="importsScrollPane" pref="350" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
@@ -535,5 +549,26 @@
</Container>
</SubComponents>
</Container>
+ <Component class="javax.swing.JLabel" name="jLabel1">
+ <Properties>
+ <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
+ <Image iconType="3" name="/org/hibernate/netbeans/console/resources/warning.png"/>
+ </Property>
+ <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/hibernate/netbeans/console/Bundle.properties" key="SessionFactoryConfigurationPanel.jLabel1.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
+ </Property>
+ <Property name="iconTextGap" type="int" value="6"/>
+ </Properties>
+ </Component>
+ <Component class="javax.swing.JLabel" name="jLabel2">
+ <Properties>
+ <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
+ <Image iconType="3" name="/org/hibernate/netbeans/console/resources/warning.png"/>
+ </Property>
+ <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/hibernate/netbeans/console/Bundle.properties" key="SessionFactoryConfigurationPanel.jLabel2.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
+ </Property>
+ </Properties>
+ </Component>
</SubComponents>
</Form>
1.5.4.1 +58 -24 jbosside/netbeans/hibernate-console/src/org/hibernate/netbeans/console/SessionFactoryConfigurationPanel.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: SessionFactoryConfigurationPanel.java
===================================================================
RCS file: /cvsroot/jboss/jbosside/netbeans/hibernate-console/src/org/hibernate/netbeans/console/SessionFactoryConfigurationPanel.java,v
retrieving revision 1.5
retrieving revision 1.5.4.1
diff -u -b -r1.5 -r1.5.4.1
--- SessionFactoryConfigurationPanel.java 14 Jun 2006 13:35:50 -0000 1.5
+++ SessionFactoryConfigurationPanel.java 19 Sep 2006 19:29:06 -0000 1.5.4.1
@@ -98,6 +98,7 @@
if (dialectIndex != -1) {
dialectComboBox.setSelectedIndex(dialectIndex);
}
+ dialectComboBox.getEditor().setItem(descriptor.getHibernateDialect());
nameField.setText(descriptor.getName());
userField.setText(descriptor.getDatabaseUser());
passwordField.setText(descriptor.getDatabasePassword());
@@ -193,6 +194,8 @@
importsPanel = new javax.swing.JPanel();
importsScrollPane = new javax.swing.JScrollPane();
importsTextArea = new javax.swing.JTextArea();
+ jLabel1 = new javax.swing.JLabel();
+ jLabel2 = new javax.swing.JLabel();
nameLabel.setLabelFor(nameField);
org.openide.awt.Mnemonics.setLocalizedText(nameLabel, org.openide.util.NbBundle.getBundle(SessionFactoryConfigurationPanel.class).getString("LBL_DisplayName")); // NOI18N
@@ -294,6 +297,7 @@
dialectLabel.setLabelFor(dialectComboBox);
org.openide.awt.Mnemonics.setLocalizedText(dialectLabel, org.openide.util.NbBundle.getBundle(SessionFactoryConfigurationPanel.class).getString("LBL_HibernateDialect")); // NOI18N
+ dialectComboBox.setEditable(true);
dialectComboBox.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
dialectComboBoxActionPerformed(evt);
@@ -321,11 +325,11 @@
.add(connectionUrlLabel))))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(simpleConfigurationPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(dialectComboBox, 0, 226, Short.MAX_VALUE)
- .add(driverComboBox, 0, 226, Short.MAX_VALUE)
- .add(userField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 226, Short.MAX_VALUE)
- .add(connectionUrlCombo, 0, 226, Short.MAX_VALUE)
- .add(passwordField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 226, Short.MAX_VALUE))
+ .add(dialectComboBox, 0, 231, Short.MAX_VALUE)
+ .add(driverComboBox, 0, 231, Short.MAX_VALUE)
+ .add(userField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 231, Short.MAX_VALUE)
+ .add(connectionUrlCombo, 0, 231, Short.MAX_VALUE)
+ .add(passwordField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 231, Short.MAX_VALUE))
.addContainerGap())
);
simpleConfigurationPanelLayout.setVerticalGroup(
@@ -351,7 +355,7 @@
.add(simpleConfigurationPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(passwordLabel)
.add(passwordField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
- .add(11, 11, 11))
+ .addContainerGap())
);
extraConfigurationTabbedPane.addTab(org.openide.util.NbBundle.getBundle(SessionFactoryConfigurationPanel.class).getString("LBL_SimpleConfiguration"), simpleConfigurationPanel); // NOI18N
@@ -365,7 +369,7 @@
advancedConfigurationPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(advancedConfigurationPanelLayout.createSequentialGroup()
.addContainerGap()
- .add(propertiesScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 345, Short.MAX_VALUE)
+ .add(propertiesScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 350, Short.MAX_VALUE)
.addContainerGap())
);
advancedConfigurationPanelLayout.setVerticalGroup(
@@ -387,7 +391,7 @@
importsPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(importsPanelLayout.createSequentialGroup()
.addContainerGap()
- .add(importsScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 345, Short.MAX_VALUE)
+ .add(importsScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 350, Short.MAX_VALUE)
.addContainerGap())
);
importsPanelLayout.setVerticalGroup(
@@ -399,6 +403,13 @@
);
extraConfigurationTabbedPane.addTab(org.openide.util.NbBundle.getBundle(SessionFactoryConfigurationPanel.class).getString("LBL_BshImports"), importsPanel); // NOI18N
+ jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/hibernate/netbeans/console/resources/warning.png")));
+ org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(SessionFactoryConfigurationPanel.class, "SessionFactoryConfigurationPanel.jLabel1.text")); // NOI18N
+ jLabel1.setIconTextGap(6);
+
+ jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/hibernate/netbeans/console/resources/warning.png")));
+ org.openide.awt.Mnemonics.setLocalizedText(jLabel2, org.openide.util.NbBundle.getMessage(SessionFactoryConfigurationPanel.class, "SessionFactoryConfigurationPanel.jLabel2.text")); // NOI18N
+
org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
@@ -407,15 +418,21 @@
.addContainerGap()
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(mappingLocationsLabel)
- .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
+ .add(layout.createSequentialGroup()
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(classPathScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 374, Short.MAX_VALUE)
- .add(org.jdesktop.layout.GroupLayout.TRAILING, mappingLocationsScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 374, Short.MAX_VALUE)
+ .add(classPathScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 379, Short.MAX_VALUE)
+ .add(layout.createSequentialGroup()
+ .add(classPathLabel)
+ .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(jLabel1)
+ .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(jLabel2))
+ .add(org.jdesktop.layout.GroupLayout.TRAILING, mappingLocationsScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 379, Short.MAX_VALUE)
.add(layout.createSequentialGroup()
.add(nameLabel)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
- .add(nameField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 276, Short.MAX_VALUE))
- .add(extraConfigurationTabbedPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 374, Short.MAX_VALUE))
+ .add(nameField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 281, Short.MAX_VALUE))
+ .add(extraConfigurationTabbedPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 379, Short.MAX_VALUE))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(downClassPathButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
@@ -426,8 +443,7 @@
.add(org.jdesktop.layout.GroupLayout.TRAILING, addMappingLocationButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(org.jdesktop.layout.GroupLayout.TRAILING, removeMappingLocationButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.add(org.jdesktop.layout.GroupLayout.TRAILING, upMappingLocationButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
- .add(org.jdesktop.layout.GroupLayout.TRAILING, downMappingLocationButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
- .add(classPathLabel))
+ .add(org.jdesktop.layout.GroupLayout.TRAILING, downMappingLocationButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))))
.addContainerGap())
);
@@ -452,13 +468,17 @@
.add(upMappingLocationButton)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(downMappingLocationButton))
- .add(mappingLocationsScrollPane))
+ .add(mappingLocationsScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 139, Short.MAX_VALUE))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(classPathLabel)
+ .add(jLabel1)
+ .add(jLabel2))
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(layout.createSequentialGroup()
- .add(classPathScrollPane)
+ .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
+ .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
+ .add(classPathScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 139, Short.MAX_VALUE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(extraConfigurationTabbedPane, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 180, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(layout.createSequentialGroup()
@@ -474,7 +494,11 @@
}// </editor-fold>//GEN-END:initComponents
private void fillConnectionCombo() {
- ConnectionDescriptor desc = (ConnectionDescriptor) dialectComboBox.getSelectedItem();
+ Object dialect = dialectComboBox.getSelectedItem();
+ if (!(dialect instanceof ConnectionDescriptor)) {
+ return;
+ }
+ ConnectionDescriptor desc = (ConnectionDescriptor) dialect;
ComboBoxEditor cbEditor = connectionUrlCombo.getEditor();
String currentValue = (String) cbEditor.getItem();
connectionUrlCombo.setModel(new DefaultComboBoxModel(desc.connectionUrls));
@@ -489,10 +513,14 @@
}//GEN-LAST:event_dialectComboBoxActionPerformed
private void fillDriverCombo() {
- ConnectionDescriptor cd = (ConnectionDescriptor) dialectComboBox.getSelectedItem();
+ Object dialect = dialectComboBox.getSelectedItem();
+ if (!(dialect instanceof ConnectionDescriptor)) {
+ return;
+ }
+ ConnectionDescriptor desc = (ConnectionDescriptor) dialect;
ComboBoxEditor editor = driverComboBox.getEditor();
Object item = editor.getItem();
- driverComboBox.setModel(new DefaultComboBoxModel(cd.drivers));
+ driverComboBox.setModel(new DefaultComboBoxModel(desc.drivers));
if (item != null) {
editor.setItem(item);
}
@@ -599,6 +627,8 @@
private javax.swing.JPanel importsPanel;
private javax.swing.JScrollPane importsScrollPane;
private javax.swing.JTextArea importsTextArea;
+ private javax.swing.JLabel jLabel1;
+ private javax.swing.JLabel jLabel2;
private javax.swing.JLabel mappingLocationsLabel;
private javax.swing.JList mappingLocationsList;
private javax.swing.JScrollPane mappingLocationsScrollPane;
@@ -628,7 +658,7 @@
descriptor.setDatabasePassword(String.valueOf(passwordField.getPassword()));
descriptor.setDatabaseDriverName((String) driverComboBox.getEditor().getItem());
descriptor.setDatabaseUrl((String) connectionUrlCombo.getEditor().getItem());
- descriptor.setHibernateDialect(((ConnectionDescriptor) dialectComboBox.getSelectedItem()).dialect);
+ descriptor.setHibernateDialect(String.valueOf(dialectComboBox.getEditor().getItem()));
descriptor.setUserImports(importsTextArea.getText());
// TODO - set the extra properties
Properties props = new Properties();
@@ -839,6 +869,10 @@
return -1;
}
+ public String toString() {
+ return dialect;
+ }
+
}
private static class DialectNameRenderer extends DefaultListCellRenderer {
1.6.4.1 +3 -2 jbosside/netbeans/hibernate-console/src/org/hibernate/netbeans/console/Bundle.properties
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Bundle.properties
===================================================================
RCS file: /cvsroot/jboss/jbosside/netbeans/hibernate-console/src/org/hibernate/netbeans/console/Bundle.properties,v
retrieving revision 1.6
retrieving revision 1.6.4.1
diff -u -b -r1.6 -r1.6.4.1
--- Bundle.properties 14 Jun 2006 13:35:50 -0000 1.6
+++ Bundle.properties 19 Sep 2006 19:29:06 -0000 1.6.4.1
@@ -52,7 +52,6 @@
LBL_DisplayName=Display &Name
LBL_MappingLocations=&Mapping Locations & Files
-
LBL_ClassPath=&Classpath Entries
LBL_AddMappingLocation=Add
@@ -82,7 +81,6 @@
LBL_HibernateDialect=&Hibernate Dialect
LBL_DatabaseUrl=Connec&tion URL
-
LBL_SimpleConfiguration=Configuration
LBL_HibernateProperties=Hibernate Properties
@@ -93,3 +91,6 @@
LBL_SessionNotOpenWarning= Session is not open. Try to reload (use context menu of session factory node)
LBL_BshImports=BeanShell Imports
+SessionFactoryConfigurationPanel.jLabel1.text=(don't add Hibernate JARS here)
+
+SessionFactoryConfigurationPanel.jLabel2.text=
1.5.4.1 +1 -1 jbosside/netbeans/hibernate-console/src/org/hibernate/netbeans/console/layer.xml
(In the diff below, changes in quantity of whitespace are not shown.)
Index: layer.xml
===================================================================
RCS file: /cvsroot/jboss/jbosside/netbeans/hibernate-console/src/org/hibernate/netbeans/console/layer.xml,v
retrieving revision 1.5
retrieving revision 1.5.4.1
diff -u -b -r1.5 -r1.5.4.1
--- layer.xml 14 Jun 2006 13:35:50 -0000 1.5
+++ layer.xml 19 Sep 2006 19:29:06 -0000 1.5.4.1
@@ -22,7 +22,7 @@
<attr name="originalFile" stringvalue="Actions/Edit/org-hibernate-netbeans-console-editor-hql-Hql2JavaStringAction.instance"/>
</file>
<file name="C-J H.shadow">
- <attr name="originalFile" stringvalue="Actions/Edit/org-hibernate-netbeans-console-editor-hql-JavaString2HqlyAction.instance"/>
+ <attr name="originalFile" stringvalue="Actions/Edit/org-hibernate-netbeans-console-editor-hql-JavaString2HqlAction.instance"/>
</file>
</folder>
More information about the jboss-cvs-commits
mailing list