JBoss Tools SVN: r2159 - trunk/documentation/GettingStartedGuide/docs/userguide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: afedosik
Date: 2007-06-22 06:23:27 -0400 (Fri, 22 Jun 2007)
New Revision: 2159
Modified:
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GettingStartedWithRHDS.xml
Log:
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GettingStartedWithRHDS.xml
===================================================================
--- trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GettingStartedWithRHDS.xml 2007-06-22 10:19:32 UTC (rev 2158)
+++ trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GettingStartedWithRHDS.xml 2007-06-22 10:23:27 UTC (rev 2159)
@@ -147,7 +147,7 @@
<title>FAQ</title>
<para>For easy reference to Red Hat Developer Studio related questions, our FAQ provides answers to our most "popular" questions.
The sections of questions are organized by type. For further support, please contact support(a)exadel.com.</para>
- <section>
+ <section id="Before_Installing">
<title>Before Installing, Tutorials, Examples, Readme Files</title>
<para><emphasis role="bold">I'm looking for examples, do you have any?</emphasis></para>
<para>Yes, simply go to our tutorials page</para>
@@ -159,12 +159,12 @@
<para><emphasis role="bold">What version of Eclipse does Red Hat Developer Studio support?</emphasis></para>
<para>Red Hat Developer Studio works with Eclipse 3.2.2 </para>
</section>
- <section>
+ <section id="Downloading">
<title>Downloading</title>
<para><emphasis role="bold">Where can I download a copy of Red Hat Developer Studio?</emphasis></para>
<para>Simply go TBD. </para>
</section>
- <section>
+ <section id="Installation_Issues">
<title>Installation Issues</title>
<para><emphasis role="bold">Do I need to have JBoss server installed to run Red Hat Developer Studio?</emphasis></para>
<para>No. Red Hat Developer Studio already comes bundled with JBoss server. We bundle it together so that you don't need to download any
@@ -175,20 +175,20 @@
<para><emphasis role="bold"> What third-party plug-ins are installed with RHDS?</emphasis></para>
<para>Read the <link linkend="Installing">Installing</link> section.</para>
</section>
- <section>
+ <section id="Importing_Projects">
<title>Importing Projects</title>
<para><emphasis role="bold">I have an existing Struts or JSF project. Can I open the project in RHDS?</emphasis></para>
<para>Yes. Read the TBD</para>
<para><emphasis role="bold">Can I import a .war file?</emphasis></para>
<para>Yes. Read the TBD</para>
</section>
- <section>
+ <section id="Troubleshooting">
<title>Troubleshooting, Problems, Configuration, Error Messages</title>
<para><emphasis role="bold">Is it possible to increase the performance of Eclipse after installing your product? My Eclipse now crawls.</emphasis></para>
<para>By default, Eclipse allocates only 128 Mb of memory whatever physical memory you actually have installed. You can significantly increase performance
if you allocate more memory. For example:</para>
<para>eclipse.exe -vmargs -Xmx512M</para>
- <para><emphasis role="bold">How can I add my own tag library to the Red Hat Palette?</emphasis></para>
+ <para><emphasis role="bold">How can I add my own tag library to the Red Hat Palette?</emphasis></para>
<para>See Adding Tag Libraries in JBossJSFTools Guide</para>
<para><emphasis role="bold">I see the Oracle ADF Faces component library tags in the Red Hat Palette, but I can't seem to find the libraries for ADF.
How do I use this component library with RHDS?</emphasis></para>
17 years, 6 months
JBoss Tools SVN: r2158 - in trunk/seam/plugins/org.jboss.ide.seam.gen: src/org/jboss/ide/seam/gen and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2007-06-22 06:19:32 -0400 (Fri, 22 Jun 2007)
New Revision: 2158
Modified:
trunk/seam/plugins/org.jboss.ide.seam.gen/META-INF/MANIFEST.MF
trunk/seam/plugins/org.jboss.ide.seam.gen/src/org/jboss/ide/seam/gen/QuestionDialog.java
trunk/seam/plugins/org.jboss.ide.seam.gen/src/org/jboss/ide/seam/gen/SeamGenProperty.java
trunk/seam/plugins/org.jboss.ide.seam.gen/src/org/jboss/ide/seam/gen/actions/SeamGenAction.java
Log:
EXIN-331 seamgen dependency on RDB should change to DTP
Modified: trunk/seam/plugins/org.jboss.ide.seam.gen/META-INF/MANIFEST.MF
===================================================================
--- trunk/seam/plugins/org.jboss.ide.seam.gen/META-INF/MANIFEST.MF 2007-06-22 02:17:32 UTC (rev 2157)
+++ trunk/seam/plugins/org.jboss.ide.seam.gen/META-INF/MANIFEST.MF 2007-06-22 10:19:32 UTC (rev 2158)
@@ -14,7 +14,9 @@
org.eclipse.jdt.launching,
org.eclipse.ui.externaltools,
org.eclipse.ant.ui,
- org.eclipse.core.filesystem
+ org.eclipse.core.filesystem,
+ org.eclipse.datatools.connectivity,
+ org.eclipse.datatools.connectivity.db.generic
Bundle-ClassPath: org.jboss.ide.seam.gen.jar
Export-Package: org.jboss.ide.seam.gen,
org.jboss.ide.seam.gen.actions
Modified: trunk/seam/plugins/org.jboss.ide.seam.gen/src/org/jboss/ide/seam/gen/QuestionDialog.java
===================================================================
--- trunk/seam/plugins/org.jboss.ide.seam.gen/src/org/jboss/ide/seam/gen/QuestionDialog.java 2007-06-22 02:17:32 UTC (rev 2157)
+++ trunk/seam/plugins/org.jboss.ide.seam.gen/src/org/jboss/ide/seam/gen/QuestionDialog.java 2007-06-22 10:19:32 UTC (rev 2158)
@@ -106,6 +106,7 @@
Map properties = questions;
Properties existing = new Properties();
+
ILaunchConfiguration configuration;
try {
configuration = SeamGenAction.findLaunchConfig( "seamgen" );
@@ -118,6 +119,8 @@
SeamGenPlugin.logError( "Error while preloading build.properties", e1 );
}
+
+
updating = true;
Text firstField = null;
Iterator iterator = properties.entrySet().iterator();
@@ -138,7 +141,7 @@
if(sgp.getInputType()==sgp.YES_NO) {
Button button = new Button(composite, SWT.CHECK);
propertyToField.put( name, button );
- sgp.applyValue( existing, button );
+ sgp.applyValue( existing, button );
GridData data = new GridData(GridData.GRAB_HORIZONTAL | GridData.FILL_HORIZONTAL);
data.horizontalSpan= 2;
button.setLayoutData(data);
@@ -190,12 +193,11 @@
label.setText( " " );
propertyToDefaultLabel.put( name, label );
- updating = false;
- //updateStatus();
-
+
}
+ updating = false;
+ // all properties have been set
-
Label label = new Label(defaultComposite, SWT.NONE); // here to make gtk less ugly.
//label.setText( "--------------" );
@@ -284,7 +286,10 @@
void updateStatus() {
if(!updating) {
setMessage( null );
- getButton( IDialogConstants.OK_ID ).setEnabled( true );
+ Button button = getButton( IDialogConstants.OK_ID );
+ if(button!=null) {
+ button.setEnabled( true );
+ }
updating = true;
// Big ineffective hack!
Map others = internalGetResult();
@@ -297,23 +302,23 @@
Map.Entry element = (Map.Entry) iter.next();
SeamGenProperty gp = (SeamGenProperty) element.getValue();
- Label text = (Label) propertyToDefaultLabel.get( element.getKey() );
+ Label defaultLabel = (Label) propertyToDefaultLabel.get( element.getKey() );
String defaultValue = gp.getDefaultValue( properties );
- text.setText( defaultValue==null?"":defaultValue );
+ defaultLabel.setText( defaultValue==null?"":defaultValue );
- String text2 = getText( element, text );
+ String text2 = getText( element, defaultLabel );
if(haveNoWarning) {
String msg = gp.valid(text2.trim());
if(text2.trim().length()>0 && msg!=null) {
setMessage( msg, IMessageProvider.ERROR );
haveNoWarning = false;
- getButton( IDialogConstants.OK_ID ).setEnabled( false );
- } else if(gp.isRequired() && text2.trim().length()==0 && text.getText().trim().length()==0 ) {
+ button.setEnabled( false );
+ } else if(gp.isRequired() && text2.trim().length()==0 && defaultLabel.getText().trim().length()==0 ) {
setMessage( "'" + gp.getDescription() + "' requires a value", IMessageProvider.ERROR );
haveNoWarning = false;
- getButton( IDialogConstants.OK_ID ).setEnabled( false );
+ button.setEnabled( false );
}
}
@@ -343,11 +348,11 @@
}*/
}
- private String getText(Map.Entry element, Label text) {
+ private String getText(Map.Entry element, Label defaultText) {
Control object = (Control) propertyToField.get(element.getKey());
if(object instanceof Button) {
Button b = (Button) object;
- b.setToolTipText( text.getText() );
+ b.setToolTipText( defaultText.getText() );
if(b.getSelection()) {
return "y";
} else {
@@ -356,7 +361,7 @@
} else {
Text enteredValue = (Text) object;
- enteredValue.setToolTipText( text.getText() );
+ enteredValue.setToolTipText( defaultText.getText() );
return enteredValue.getText();
}
}
Modified: trunk/seam/plugins/org.jboss.ide.seam.gen/src/org/jboss/ide/seam/gen/SeamGenProperty.java
===================================================================
--- trunk/seam/plugins/org.jboss.ide.seam.gen/src/org/jboss/ide/seam/gen/SeamGenProperty.java 2007-06-22 02:17:32 UTC (rev 2157)
+++ trunk/seam/plugins/org.jboss.ide.seam.gen/src/org/jboss/ide/seam/gen/SeamGenProperty.java 2007-06-22 10:19:32 UTC (rev 2158)
@@ -65,7 +65,6 @@
public void applyValue(Properties existing, Control control) {
- try {
String property = existing.getProperty( getDefaultPropertyName() );
if(property!=null) {
if(control instanceof Text) {
@@ -80,10 +79,6 @@
System.out.println(getDefaultPropertyName() + " " + property);
}
}
- } catch(Exception e) {
- e.printStackTrace();
- }
-
}
public String getDefaultPropertyName() {
Modified: trunk/seam/plugins/org.jboss.ide.seam.gen/src/org/jboss/ide/seam/gen/actions/SeamGenAction.java
===================================================================
--- trunk/seam/plugins/org.jboss.ide.seam.gen/src/org/jboss/ide/seam/gen/actions/SeamGenAction.java 2007-06-22 02:17:32 UTC (rev 2157)
+++ trunk/seam/plugins/org.jboss.ide.seam.gen/src/org/jboss/ide/seam/gen/actions/SeamGenAction.java 2007-06-22 10:19:32 UTC (rev 2158)
@@ -23,6 +23,17 @@
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
+import org.eclipse.datatools.connectivity.ConnectionProfileConstants;
+import org.eclipse.datatools.connectivity.ConnectionProfileException;
+import org.eclipse.datatools.connectivity.IConnectionProfile;
+import org.eclipse.datatools.connectivity.ProfileManager;
+import org.eclipse.datatools.connectivity.db.generic.IDBConnectionProfileConstants;
+import org.eclipse.datatools.connectivity.db.generic.IDBDriverDefinitionConstants;
+import org.eclipse.datatools.connectivity.drivers.DriverInstance;
+import org.eclipse.datatools.connectivity.drivers.DriverManager;
+import org.eclipse.datatools.connectivity.drivers.DriverMgmtMessages;
+import org.eclipse.datatools.connectivity.drivers.IDriverMgmtConstants;
+import org.eclipse.datatools.connectivity.drivers.IPropertySet;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfiguration;
@@ -44,6 +55,8 @@
import org.jboss.ide.seam.gen.QuestionDialog;
import org.jboss.ide.seam.gen.SeamGenPlugin;
+import com.sun.tools.corba.se.idl.som.cff.Messages;
+
public abstract class SeamGenAction implements IWorkbenchWindowActionDelegate {
private final class LaunchListener implements ILaunchesListener2 {
@@ -76,40 +89,92 @@
}
if(MessageDialog.openQuestion( getShell(), "Create DB Connection", "Create DB Connection ?" )) {
-// DatabaseDefinition definition = RDBCorePlugin
-// .getDefault().getDatabaseDefinitionRegistry()
-// .getDefinition( "Generic JDBC", "1.0" );
-//
-// ConnectionInfo connection = RDBCorePlugin.getDefault()
-// .getConnectionManager().createConnectionInfo(
-// definition,
-// NewCWJDBCPage.createUniqueConnectionName( NewCWJDBCPage.getExistingConnectionNamesList(), "seamgen-connection"));
-
-
-// Properties seamGenProperties = getSeamGenProperties( launch2.getLaunchConfiguration() );
-//
-// if(seamGenProperties!=null) {
-// connection.setDatabaseName("SeamGen database");
-// connection.setURL(seamGenProperties.getProperty( "hibernate.connection.url", "" ));
-// connection.setDriverClassName(seamGenProperties.getProperty( "hibernate.connection.driver_class", "" ));
-// connection.setLoadingPath(seamGenProperties.getProperty( "driver.jar", "" ));
-// connection.setUserName( seamGenProperties.getProperty( "hibernate.connection.username", "" ) );
-// connection.setPassword( seamGenProperties.getProperty( "hibernate.connection.password", "" ) );
-// connection.setCustomProperty( "JDBC_DRIVER","Other");
-// try {
-// connection.saveConnectionInfo();
-// }
-// catch (Exception e) {
-// SeamGenPlugin.logError( "Could not save connection info", e);
-// }
-// } else {
-// MessageDialog.openError( getShell(), "Could not read database settings", "Could not read database settings. See Error log for details" );
-// }
+ createDatabaseConnection(launch2);
+ }
+ }
-
+ public DriverInstance createNewDriverInstance(String templateID,
+ String name, String jarList, String driverClass) {
+ if (templateID == null) return null;
+ if (name == null) return null;
+ if (jarList == null) return null;
+
+ DriverInstance existing = DriverManager.getInstance().getDriverInstanceByName(name);
+ int number = 0;
+ String origName = name;
+ while(existing!=null ) {
+ number++;
+ name = origName+number;
+ existing = DriverManager.getInstance().getDriverInstanceByName("DriverDefn."+name);
+ }
+
+ IPropertySet pset = DriverManager.getInstance().createDefaultInstance(templateID);
+ pset.setName(name);
+ String prefix = DriverMgmtMessages
+ .getString("NewDriverDialog.text.id_prefix"); //$NON-NLS-1$
+ String id = prefix + name;
+ pset.setID(id);
+ Properties props = pset.getBaseProperties();
+ props.setProperty(IDriverMgmtConstants.PROP_DEFN_JARLIST, jarList);
+ props.setProperty(IDBDriverDefinitionConstants.DRIVER_CLASS_PROP_ID, driverClass);
+ DriverManager.getInstance().addDriverInstance(pset);
+ return DriverManager.getInstance().getDriverInstanceByID(pset.getID());
+ }
- }
- }
+
+ private void createDatabaseConnection(
+ final ILaunch launch2) {
+
+ Properties seamGenProperties = getSeamGenProperties( launch2.getLaunchConfiguration() );
+ String projectName = seamGenProperties.getProperty( "project.name" );
+
+ Properties dbProperties = new Properties();
+ if(seamGenProperties!=null) {
+ DriverInstance driverInstance = createNewDriverInstance("org.eclipse.datatools.connectivity.db.generic.genericDriverTemplate",
+ projectName + " seamgen-driver",
+ seamGenProperties.getProperty("driver.jar", ""),
+ seamGenProperties.getProperty( "hibernate.connection.driver_class", "" ));
+
+ dbProperties.setProperty(ConnectionProfileConstants.PROP_DRIVER_DEFINITION_ID, driverInstance.getId());
+ dbProperties.setProperty(IDBConnectionProfileConstants.DRIVER_CLASS_PROP_ID, seamGenProperties.getProperty( "hibernate.connection.driver_class", "" ));
+ dbProperties.setProperty(IDBConnectionProfileConstants.DATABASE_VENDOR_PROP_ID, "Generic JDBC");
+ dbProperties.setProperty(IDBConnectionProfileConstants.DATABASE_VERSION_PROP_ID, "1.0");
+ dbProperties.setProperty(IDBConnectionProfileConstants.DATABASE_NAME_PROP_ID, "SeamGen database");
+ dbProperties.setProperty(IDBConnectionProfileConstants.PASSWORD_PROP_ID, seamGenProperties.getProperty( "hibernate.connection.password", "" ));
+ dbProperties.setProperty(IDBConnectionProfileConstants.USERNAME_PROP_ID, seamGenProperties.getProperty( "hibernate.connection.username", "" ));
+ dbProperties.setProperty(IDBConnectionProfileConstants.URL_PROP_ID, seamGenProperties.getProperty( "hibernate.connection.url", "" ));
+
+
+ //connection.setLoadingPath(seamGenProperties.getProperty( "driver.jar", "" ));
+
+ //connection.setCustomProperty( "JDBC_DRIVER","Other");
+
+ try {
+ String name = projectName + " seamgen-connection";
+ IConnectionProfile existing = ProfileManager.getInstance().getProfileByName(name);
+ int number = 0;
+ String origName = name;
+ while(existing!=null) {
+ number++;
+ name=origName+number;
+ existing = ProfileManager.getInstance().getProfileByName(name);
+ }
+
+ ProfileManager.getInstance().createProfile(name,
+ "Database created for seam-gen project",
+ IDBConnectionProfileConstants.CONNECTION_PROFILE_ID,
+ dbProperties
+ );
+ // TODO unique name ? NewCWJDBCPage.createUniqueConnectionName( NewCWJDBCPage.getExistingConnectionNamesList(), "seamgen-connection"));
+ } catch (ConnectionProfileException e) {
+ SeamGenPlugin.logError("Could not create database connection", e);
+ MessageDialog.openError( getShell(), "Could not create database connection", "Could not create database connection. See Error log for details" );
+ }
+
+ } else {
+ MessageDialog.openError( getShell(), "Could not read database settings", "Could not read database settings. See Error log for details" );
+ }
+ }
});
return;
}
@@ -275,6 +340,7 @@
} catch (CoreException e) {
SeamGenPlugin.logError( "Exception when trying to launch seamgen", e );
+ MessageDialog.openError(getShell(), "Seam-gen could not start", e.getMessage());
}
}
@@ -372,7 +438,7 @@
}
return p;
} else {
- return null;
+ return new Properties(); // no exsting settings.
}
}
17 years, 6 months
JBoss Tools SVN: r2157 - trunk/core/features/org.jboss.ide.eclipse.feature.
by jbosstools-commits@lists.jboss.org
Author: mculpepper(a)jboss.com
Date: 2007-06-21 22:17:32 -0400 (Thu, 21 Jun 2007)
New Revision: 2157
Modified:
trunk/core/features/org.jboss.ide.eclipse.feature/feature.xml
Log:
should've been version 2.0.0
Modified: trunk/core/features/org.jboss.ide.eclipse.feature/feature.xml
===================================================================
--- trunk/core/features/org.jboss.ide.eclipse.feature/feature.xml 2007-06-21 19:59:58 UTC (rev 2156)
+++ trunk/core/features/org.jboss.ide.eclipse.feature/feature.xml 2007-06-22 02:17:32 UTC (rev 2157)
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature
id="org.jboss.ide.eclipse.feature"
- label="JBossIDE for Eclipse"
- version="0.0.0"
+ label="JBossTools"
+ version="2.0.0"
provider-name="JBoss, a division of Red Hat"
image="splash.jpg">
17 years, 6 months
JBoss Tools SVN: r2156 - in trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui: wizards and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-06-21 15:59:58 -0400 (Thu, 21 Jun 2007)
New Revision: 2156
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/NewWARAction.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/AbstractJBossRuntimeWizardFragment.java
Log:
committing to test compatibility with eclipse 3.3. no guarantee any of these changes work
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/NewWARAction.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/NewWARAction.java 2007-06-21 19:59:55 UTC (rev 2155)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/packages/NewWARAction.java 2007-06-21 19:59:58 UTC (rev 2156)
@@ -73,7 +73,7 @@
protected static class WarPreviewPage extends PreviewPage {
protected WarPreviewPage(NewWARWizard wiz) {
- super(wiz, "WAR information", "WAR Information",
+ super(wiz, "WAR Archive Stub", "WAR Archive Stub",
ArchivesSharedImages.getImageDescriptor(ArchivesSharedImages.IMG_NEW_WAR_WIZARD));
}
protected void addToPackage() {
@@ -82,8 +82,8 @@
}
protected String getDescriptionMessage() {
- return "Information for the setup of your WAR. \n" +
- "Later, you can customize this packaging structure further.";
+ return "Below is a stub archive configuration for your project. \n" +
+ "You can customize this structure further after pressing finish.";
}
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/AbstractJBossRuntimeWizardFragment.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/AbstractJBossRuntimeWizardFragment.java 2007-06-21 19:59:55 UTC (rev 2155)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/AbstractJBossRuntimeWizardFragment.java 2007-06-21 19:59:58 UTC (rev 2156)
@@ -165,8 +165,6 @@
private void setWidgetDefaults() {
nameText.setText(generateNewRuntimeName());
- System.out.println("platform os = " + Platform.getOS());
- System.out.println("win32 value: " + Platform.WS_WIN32);
homeDirText.setText( Platform.getOS().equals( Platform.WS_WIN32 ) ?
"c:/program files/jboss-" + getRuntimeVersionId() + ".x" :
"/usr/bin/jboss-" + getRuntimeVersionId() + ".x");
17 years, 6 months
JBoss Tools SVN: r2155 - in trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core: publishers and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-06-21 15:59:55 -0400 (Thu, 21 Jun 2007)
New Revision: 2155
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/ArchivesModelModuleContributor.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/ProjectArchiveStorer.java
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/ArchivesBuildListener.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/PackageModuleFactory.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java
Log:
committing to test compatibility with eclipse 3.3. no guarantee any of these changes work
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/ArchivesBuildListener.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/ArchivesBuildListener.java 2007-06-21 16:10:17 UTC (rev 2154)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/ArchivesBuildListener.java 2007-06-21 19:59:55 UTC (rev 2155)
@@ -192,7 +192,7 @@
else
p = delta.getPreNode().getProjectPath();
- PackageModuleFactory.getFactory().refreshProject(p);
+ ArchivesModelModuleContributor.getInstance().refreshProject(p);
}
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/ArchivesModelModuleContributor.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/ArchivesModelModuleContributor.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/ArchivesModelModuleContributor.java 2007-06-21 19:59:55 UTC (rev 2155)
@@ -0,0 +1,129 @@
+package org.jboss.ide.eclipse.as.core.packages;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.wst.server.core.IModule;
+import org.jboss.ide.eclipse.archives.core.model.ArchivesModel;
+import org.jboss.ide.eclipse.archives.core.model.ArchivesModelCore;
+import org.jboss.ide.eclipse.archives.core.model.IArchive;
+import org.jboss.ide.eclipse.as.core.packages.PackageModuleFactory.IModuleContributor;
+import org.jboss.ide.eclipse.as.core.packages.PackageModuleFactory.PackagedModuleDelegate;
+
+public class ArchivesModelModuleContributor implements IModuleContributor {
+
+ private static ArchivesModelModuleContributor instance;
+ public static ArchivesModelModuleContributor getInstance() {
+ if( instance == null ) {
+ instance = new ArchivesModelModuleContributor(PackageModuleFactory.getFactory());
+ }
+ return instance;
+ }
+
+ private PackageModuleFactory factory;
+ protected ArrayList modules = null;
+ protected HashMap projectToModules = new HashMap(5); //IPath to IModule
+ protected HashMap moduleDelegates = new HashMap(5);
+ protected HashMap packageToModule = new HashMap(5);
+
+ private ArchivesModelModuleContributor(PackageModuleFactory factory) {
+ this.factory = factory;
+ }
+
+ public IModule[] getModules() {
+ if( modules == null ) {
+ modules = new ArrayList();
+ IProject[] projects2 = ResourcesPlugin.getWorkspace().getRoot().getProjects();
+ int size = projects2.length;
+ for (int i = 0; i < size; i++) {
+ if (projects2[i].isAccessible()) {
+ createModules(projects2[i]);
+ }
+ }
+ }
+ return (IModule[]) modules.toArray(new IModule[modules.size()]);
+ }
+
+ protected void createModules(IProject project) {
+ try {
+ if( ArchivesModelCore.getProjectPackages(project.getLocation(), null, true).length > 0 ) {
+ IModule module;
+ IArchive[] packages = ArchivesModelCore.getProjectPackages(project.getLocation(), new NullProgressMonitor(), true);
+ boolean requiresSave = ensureArchivesHaveIDs(project, packages);
+ ArrayList mods = new ArrayList();
+ for( int i = 0; i < packages.length; i++ ) {
+ module = factory.createModule2(packages[i], project);
+ modules.add(module);
+ Object moduleDelegate = new PackagedModuleDelegate(packages[i]);
+ packageToModule.put(packages[i], module);
+ moduleDelegates.put(module, moduleDelegate);
+ mods.add(module);
+ }
+ projectToModules.put(project.getLocation(), mods);
+ }
+ } catch( Throwable t ) {
+ t.printStackTrace();
+ }
+ }
+
+ public boolean containsModule(IModule module) {
+ return moduleDelegates.containsKey(module);
+ }
+
+ public PackagedModuleDelegate getModuleDelegate(IModule module) {
+ return (PackagedModuleDelegate)moduleDelegates.get(module);
+ }
+
+ public void refreshProject(IPath projectLoc) {
+ // remove old mods
+ ArrayList mods = (ArrayList)projectToModules.get(projectLoc);
+ IModule mod;
+ IArchive arc;
+ for( Iterator i = mods.iterator(); i.hasNext();) {
+ mod = (IModule)i.next();
+ arc = ((PackagedModuleDelegate)moduleDelegates.get(mod)).getPackage();
+ packageToModule.remove(arc);
+ moduleDelegates.remove(mod);
+ }
+ createModules(findProject(projectLoc));
+ factory.clearModuleCache();
+ }
+
+ protected IProject findProject(IPath projectLoc) {
+ IProject proj = null;
+ IProject[] projects2 = ResourcesPlugin.getWorkspace().getRoot().getProjects();
+ int size = projects2.length;
+ for (int i = 0; i < size; i++) {
+ if( projects2[i].getLocation().equals(projectLoc))
+ proj = projects2[i];
+ }
+ return proj;
+ }
+
+ /**
+ * Set a property so that each module that's here in the factory
+ * has a unique ID other than it's name (which is not unique)
+ * @param archives
+ * @return returns whether a save has occurred
+ */
+ protected boolean ensureArchivesHaveIDs(IProject project, IArchive[] archives) {
+ boolean requiresSave = false;
+ for( int i = 0; i < archives.length; i++ ) {
+ if( PackageModuleFactory.getID(archives[i]) == null ) {
+ requiresSave = true;
+ archives[i].setProperty(PackageModuleFactory.MODULE_ID_PROPERTY_KEY,
+ PackageModuleFactory.getID(archives[i], true));
+ }
+ }
+ if( requiresSave ) {
+ // save
+ ArchivesModel.instance().saveModel(project.getLocation(), new NullProgressMonitor());
+ }
+ return requiresSave;
+ }
+}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/PackageModuleFactory.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/PackageModuleFactory.java 2007-06-21 16:10:17 UTC (rev 2154)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/PackageModuleFactory.java 2007-06-21 19:59:55 UTC (rev 2155)
@@ -22,6 +22,7 @@
package org.jboss.ide.eclipse.as.core.packages;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
@@ -43,8 +44,6 @@
import org.eclipse.wst.server.core.model.IModuleResource;
import org.eclipse.wst.server.core.model.ModuleDelegate;
import org.eclipse.wst.server.core.model.ModuleFactoryDelegate;
-import org.jboss.ide.eclipse.archives.core.model.ArchivesModel;
-import org.jboss.ide.eclipse.archives.core.model.ArchivesModelCore;
import org.jboss.ide.eclipse.archives.core.model.IArchive;
import org.jboss.ide.eclipse.archives.core.model.IArchiveFileSet;
import org.jboss.ide.eclipse.archives.core.model.IArchiveFolder;
@@ -73,19 +72,21 @@
private static PackageModuleFactory factDelegate;
private static ModuleFactory factory;
+ /**
+ * Find the module factory wrapper WTP provides for us
+ * @return
+ */
public static PackageModuleFactory getFactory() {
if( factDelegate == null ) {
- // find them
ModuleFactory[] factories = ServerPlugin.getModuleFactories();
- search:
for( int i = 0; i < factories.length; i++ ) {
if( factories[i].getId().equals(PackageModuleFactory.FACTORY_TYPE_ID)) {
Object o = factories[i].getDelegate(new NullProgressMonitor());
if( o instanceof PackageModuleFactory ) {
factory = factories[i];
factDelegate = (PackageModuleFactory)o;
- break search;
+ return factDelegate;
}
}
}
@@ -93,9 +94,23 @@
return factDelegate;
}
+ /**
+ * Get the module ID of this IArchive if it exists.
+ * Do not create a new one otherwise
+ * @param pack
+ * @return
+ */
public static String getID(IArchive pack) {
return getID(pack, false);
}
+
+ /**
+ * Get the module ID of this IArchive if it exists.
+ * If create is true, and the ID is not set, set a default ID.
+ * @param pack
+ * @param create
+ * @return
+ */
protected static String getID(IArchive pack, boolean create) {
String propVal = pack.getProperty(MODULE_ID_PROPERTY_KEY);
if( propVal == null && create ) {
@@ -116,6 +131,12 @@
}
return propVal;
}
+
+ /**
+ * Return the name of the project in the workspace
+ * @param node
+ * @return
+ */
public static String getProjectName(IArchiveNode node) {
IPath projPath = node.getProjectPath();
if( projPath == null ) return null;
@@ -125,130 +146,50 @@
return list[i].getName();
return null;
}
+
+ /**
+ * Get the visible name of this module
+ * @param pack
+ * @return
+ */
public static String getName(IArchive pack) {
- String projName = getProjectName(pack);
- return projName + "/" + pack.getName();
+ return getProjectName(pack) + "/" + pack.getName();
}
- /*
- * The beginning of the class. Finally!
- */
-
-
-
-
-
- protected HashMap moduleDelegates = new HashMap(5);
- protected HashMap packageToModule = new HashMap(5);
- protected HashMap projectToPackages = new HashMap(5);
+ protected IModuleContributor[] moduleContributors;
public PackageModuleFactory() {
super();
+ moduleContributors = new IModuleContributor[] { ArchivesModelModuleContributor.getInstance() };
+
}
- /**
- * Set a property so that each module that's here in the factory
- * has a unique ID other than it's name (which is not unique)
- * @param archives
- * @return returns whether a save has occurred
- */
- protected boolean ensureArchivesHaveIDs(IProject project, IArchive[] archives) {
- boolean requiresSave = false;
- for( int i = 0; i < archives.length; i++ ) {
- if( getID(archives[i]) == null ) {
- requiresSave = true;
- archives[i].setProperty(MODULE_ID_PROPERTY_KEY, getID(archives[i], true));
- }
- }
- if( requiresSave ) {
- // save
- ArchivesModel.instance().saveModel(project.getLocation(), new NullProgressMonitor());
- }
- return requiresSave;
+ protected IModule createModule2(IArchive pack, IProject project) {
+ return createModule(getID(pack), getName(pack), MODULE_TYPE, VERSION, project);
}
-
- /**
- * Create and return the modules for a given IProject
- * @param project The project which has the modules
- * @return The modules that the project has
- */
- protected IModule[] createModules(IProject project) {
- try {
- if( ArchivesModelCore.getProjectPackages(project.getLocation(), null, true).length > 0 ) {
- ArrayList list = new ArrayList();
- IModule module;
- IArchive[] packages = ArchivesModelCore.getProjectPackages(project.getLocation(), new NullProgressMonitor(), true);
- boolean saved = ensureArchivesHaveIDs(project, packages);
- for( int i = 0; i < packages.length; i++ ) {
- module = createModule(getID(packages[i]), getName(packages[i]),
- MODULE_TYPE, VERSION, project);
- list.add(module);
- Object moduleDelegate = new PackagedModuleDelegate(packages[i]);
- moduleDelegates.put(module, moduleDelegate);
- packageToModule.put(packages[i], module);
- }
- projectToPackages.put(project, packages);
- return (IModule[]) list.toArray(new IModule[list.size()]);
- }
- } catch( Throwable t ) {
- t.printStackTrace();
+ public IModule[] getModules() {
+ ArrayList list = new ArrayList();
+ for( int i = 0; i < moduleContributors.length; i++ ) {
+ list.addAll(Arrays.asList(moduleContributors[i].getModules()));
}
- return new IModule[]{};
+ return (IModule[]) list.toArray(new IModule[list.size()]);
}
-
- public ModuleDelegate getModuleDelegate(IModule module) {
- return (ModuleDelegate) moduleDelegates.get(module);
- }
-
- public IModule getModuleFromPackage(IArchive pack) {
- return (IModule)packageToModule.get(pack);
- }
-
- private static boolean initiated = false;
- public IModule[] getModules() {
- if( !initiated )
- init();
- Collection c = packageToModule.values();
- return (IModule[]) c.toArray(new IModule[c.size()]);
- }
- protected void init() {
- IProject[] projects2 = ResourcesPlugin.getWorkspace().getRoot().getProjects();
- int size = projects2.length;
- for (int i = 0; i < size; i++) {
- if (projects2[i].isAccessible()) {
- createModules(projects2[i]);
- }
+ public ModuleDelegate getModuleDelegate(IModule module) {
+ for( int i = 0; i < moduleContributors.length; i++ ) {
+ if( moduleContributors[i].containsModule(module))
+ return moduleContributors[i].getModuleDelegate(module);
}
+ return null;
}
-
- public void refreshProject(IPath projectLoc) {
- IProject proj = null;
- IProject[] projects2 = ResourcesPlugin.getWorkspace().getRoot().getProjects();
- int size = projects2.length;
- for (int i = 0; i < size; i++) {
- if( projects2[i].getLocation().equals(projectLoc))
- proj = projects2[i];
- }
- if( proj != null ) {
- IArchive[] archives = (IArchive[])projectToPackages.get(proj);
- IModule mod;
- projectToPackages.remove(proj);
- if( archives != null ) {
- for( int i = 0; i < archives.length; i++ ) {
- mod = (IModule)packageToModule.get(archives[i]);
- packageToModule.remove(archives[i]);
- moduleDelegates.remove(mod);
- }
- }
- createModules(proj);
- System.out.println("clearing cache");
- clearModuleCache();
- }
+ public static interface IModuleContributor {
+ public IModule[] getModules();
+ public boolean containsModule(IModule module);
+ public PackagedModuleDelegate getModuleDelegate(IModule module);
}
public static interface IExtendedModuleResource extends IModuleResource {
@@ -258,7 +199,7 @@
public IPath getConcreteDestFile();
}
- public class DelegateInitVisitor implements IArchiveNodeVisitor {
+ public static class DelegateInitVisitor implements IArchiveNodeVisitor {
private IArchive pack;
private HashMap members; // node -> imoduleresource
@@ -303,7 +244,7 @@
}
}
- public class ArchiveContainerResource implements IModuleFolder, IExtendedModuleResource {
+ public static class ArchiveContainerResource implements IModuleFolder, IExtendedModuleResource {
protected IPath moduleRelativePath;
protected IArchiveNode node;
@@ -363,7 +304,6 @@
}
public void removeFilesetPathAsChild(IArchiveFileSet fs, IPath path) {
- IPath archiveRelative = fs.getRootArchiveRelativePath(path);
IPath globalSource = fs.getGlobalSourcePath();
IPath fsRelative = path.removeFirstSegments(globalSource.segmentCount());
ArchiveContainerResource parent = find(fs, globalSource, fsRelative.removeLastSegments(1), false);
@@ -425,7 +365,7 @@
}
- public class ExtendedModuleFile extends ModuleFile implements IExtendedModuleResource {
+ public static class ExtendedModuleFile extends ModuleFile implements IExtendedModuleResource {
private IPath srcPath;
private IArchiveFileSet node;
public ExtendedModuleFile(String name, IPath relativePath, long stamp,
@@ -461,8 +401,7 @@
}
-
- public class PackagedModuleDelegate extends ModuleDelegate {
+ public static class PackagedModuleDelegate extends ModuleDelegate {
private IArchive pack;
private IModuleResource rootResource;
private DelegateInitVisitor initVisitor;
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/ProjectArchiveStorer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/ProjectArchiveStorer.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/ProjectArchiveStorer.java 2007-06-21 19:59:55 UTC (rev 2155)
@@ -0,0 +1,55 @@
+package org.jboss.ide.eclipse.as.core.packages;
+
+import java.util.HashMap;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.QualifiedName;
+import org.jboss.ide.eclipse.archives.core.model.ArchivesModel;
+import org.jboss.ide.eclipse.archives.core.model.IArchive;
+import org.jboss.ide.eclipse.archives.core.model.internal.xb.XMLBinding;
+import org.jboss.ide.eclipse.archives.core.model.internal.xb.XbPackage;
+import org.jboss.ide.eclipse.archives.core.model.internal.xb.XbPackages;
+import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
+
+
+public class ProjectArchiveStorer {
+ public static final String JST_ARCHIVE_CONFIGURATION = "jst.archive.configuration";
+ private static HashMap cache = new HashMap();
+
+ public static IArchive getArchiveFor(IProject project) {
+ if( cache.containsKey(project))
+ return (IArchive)cache.get(project);
+ return loadArchiveFrom(project);
+ }
+
+ public static IArchive loadArchiveFrom(IProject project) {
+ try {
+ String s = project.getPersistentProperty(new QualifiedName(JBossServerCorePlugin.PLUGIN_ID, JST_ARCHIVE_CONFIGURATION));
+ if( s != null ) {
+ XbPackages packs = XMLBinding.unmarshal(s, new NullProgressMonitor());
+ if( packs != null && packs.getAllChildren().size() == 1 ) {
+ XbPackage pack = (XbPackage)packs.getAllChildren().get(0);
+ IArchive node = (IArchive)ArchivesModel.createPackageNodeImpl(project.getLocation(), pack, null);
+ if( node != null ) {
+ cache.put(project, node);
+ }
+ }
+ }
+ } catch( CoreException ce ) {
+ ce.printStackTrace();
+ }
+ return (IArchive)cache.get(project);
+ }
+
+ public static void storeArchive(IProject project, IArchive archive) {
+ try {
+ String s = XMLBinding.marshall(archive, new NullProgressMonitor());
+ if( s != null )
+ project.setPersistentProperty(new QualifiedName(JBossServerCorePlugin.PLUGIN_ID, JST_ARCHIVE_CONFIGURATION), s);
+ } catch( CoreException ce) {
+ ce.printStackTrace();
+ }
+ }
+}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java 2007-06-21 16:10:17 UTC (rev 2154)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java 2007-06-21 19:59:55 UTC (rev 2155)
@@ -27,6 +27,7 @@
import java.util.TreeSet;
import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -46,6 +47,7 @@
import org.jboss.ide.eclipse.as.core.model.EventLogModel;
import org.jboss.ide.eclipse.as.core.model.EventLogModel.EventLogTreeItem;
import org.jboss.ide.eclipse.as.core.packages.ModulePackageTypeConverter;
+import org.jboss.ide.eclipse.as.core.packages.ProjectArchiveStorer;
import org.jboss.ide.eclipse.as.core.publishers.PublisherEventLogger.PublishEvent;
import org.jboss.ide.eclipse.as.core.publishers.PublisherEventLogger.PublisherFileUtilListener;
import org.jboss.ide.eclipse.as.core.server.attributes.IDeployableServer;
@@ -96,7 +98,7 @@
EventLogModel.markChanged(eventRoot);
boolean incremental = shouldPublishIncremental(module, kind, deltaKind, modulePublishState);
- IArchive topLevel = getTopPackage(module, jbServer.getDeployDirectory(), incremental, monitor);
+ IArchive topLevel = getTopPackage(module, jbServer.getDeployDirectory(), monitor);
if( topLevel != null ) {
@@ -122,7 +124,7 @@
int kind, int deltaKind, int modulePublishKind, IProgressMonitor monitor) throws CoreException {
PublishEvent event = PublisherEventLogger.createSingleModuleTopEvent(eventRoot, module, kind, deltaKind);
- IArchive topLevel = getTopPackage(module, jbServer.getDeployDirectory(), false, monitor);
+ IArchive topLevel = getTopPackage(module, jbServer.getDeployDirectory(), monitor);
if( topLevel != null ) {
IPath path = topLevel.getArchiveFilePath();
FileUtil.safeDelete(path.toFile(), new PublisherFileUtilListener(event));
@@ -135,14 +137,21 @@
}
- protected IArchive getTopPackage(IModule module, String deployDir,
- boolean incremental, IProgressMonitor monitor) {
- if( !moduleToArchiveMap.containsKey(module.getId()) || !incremental) {
- IArchive top = createTopPackage(module, deployDir, monitor);
- if( top != null )
+ protected IArchive getTopPackage(IModule module, String deployDir, IProgressMonitor monitor) {
+ if( moduleToArchiveMap.containsKey(module.getId())) {
+ return (IArchive)moduleToArchiveMap.get(module.getId());
+ }
+
+ IProject project = module.getProject();
+ IArchive top = ProjectArchiveStorer.getArchiveFor(project);
+ if( top == null ) {
+ top = createTopPackage(module, deployDir, monitor);
+ if( top != null ) {
+ ProjectArchiveStorer.storeArchive(project, top);
moduleToArchiveMap.put(module.getId(), top);
+ }
}
- return (IArchive)moduleToArchiveMap.get(module.getId());
+ return top;
}
protected IArchive createTopPackage(IModule module, String deployDir, IProgressMonitor monitor) {
17 years, 6 months
JBoss Tools SVN: r2154 - in trunk/seam/plugins/org.jboss.ide.seam.gen: src/org/jboss/ide/seam/gen/actions and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: mculpepper(a)jboss.com
Date: 2007-06-21 12:10:17 -0400 (Thu, 21 Jun 2007)
New Revision: 2154
Modified:
trunk/seam/plugins/org.jboss.ide.seam.gen/META-INF/MANIFEST.MF
trunk/seam/plugins/org.jboss.ide.seam.gen/src/org/jboss/ide/seam/gen/actions/SeamGenAction.java
Log:
commented out RDB dependency for now
Modified: trunk/seam/plugins/org.jboss.ide.seam.gen/META-INF/MANIFEST.MF
===================================================================
--- trunk/seam/plugins/org.jboss.ide.seam.gen/META-INF/MANIFEST.MF 2007-06-21 09:13:35 UTC (rev 2153)
+++ trunk/seam/plugins/org.jboss.ide.seam.gen/META-INF/MANIFEST.MF 2007-06-21 16:10:17 UTC (rev 2154)
@@ -14,14 +14,7 @@
org.eclipse.jdt.launching,
org.eclipse.ui.externaltools,
org.eclipse.ant.ui,
- org.eclipse.core.filesystem,
- org.eclipse.wst.rdb.core,
- org.eclipse.wst.rdb.connection.ui,
- org.eclipse.wst.rdb.connection.ui.infopop,
- org.eclipse.wst.rdb.core.ui,
- org.eclipse.wst.rdb.data.core,
- org.eclipse.wst.rdb.data.ui,
- org.eclipse.wst.rdb.dbdefinition.generic.jdbc
+ org.eclipse.core.filesystem
Bundle-ClassPath: org.jboss.ide.seam.gen.jar
Export-Package: org.jboss.ide.seam.gen,
org.jboss.ide.seam.gen.actions
Modified: trunk/seam/plugins/org.jboss.ide.seam.gen/src/org/jboss/ide/seam/gen/actions/SeamGenAction.java
===================================================================
--- trunk/seam/plugins/org.jboss.ide.seam.gen/src/org/jboss/ide/seam/gen/actions/SeamGenAction.java 2007-06-21 09:13:35 UTC (rev 2153)
+++ trunk/seam/plugins/org.jboss.ide.seam.gen/src/org/jboss/ide/seam/gen/actions/SeamGenAction.java 2007-06-21 16:10:17 UTC (rev 2154)
@@ -41,10 +41,6 @@
import org.eclipse.ui.IWorkbenchWindowActionDelegate;
import org.eclipse.ui.externaltools.internal.launchConfigurations.ExternalToolsUtil;
import org.eclipse.ui.externaltools.internal.model.IExternalToolConstants;
-import org.eclipse.wst.rdb.connection.internal.ui.wizards.shared.NewCWJDBCPage;
-import org.eclipse.wst.rdb.internal.core.RDBCorePlugin;
-import org.eclipse.wst.rdb.internal.core.connection.ConnectionInfo;
-import org.eclipse.wst.rdb.internal.core.definition.DatabaseDefinition;
import org.jboss.ide.seam.gen.QuestionDialog;
import org.jboss.ide.seam.gen.SeamGenPlugin;
@@ -80,35 +76,35 @@
}
if(MessageDialog.openQuestion( getShell(), "Create DB Connection", "Create DB Connection ?" )) {
- DatabaseDefinition definition = RDBCorePlugin
- .getDefault().getDatabaseDefinitionRegistry()
- .getDefinition( "Generic JDBC", "1.0" );
+// DatabaseDefinition definition = RDBCorePlugin
+// .getDefault().getDatabaseDefinitionRegistry()
+// .getDefinition( "Generic JDBC", "1.0" );
+//
+// ConnectionInfo connection = RDBCorePlugin.getDefault()
+// .getConnectionManager().createConnectionInfo(
+// definition,
+// NewCWJDBCPage.createUniqueConnectionName( NewCWJDBCPage.getExistingConnectionNamesList(), "seamgen-connection"));
- ConnectionInfo connection = RDBCorePlugin.getDefault()
- .getConnectionManager().createConnectionInfo(
- definition,
- NewCWJDBCPage.createUniqueConnectionName( NewCWJDBCPage.getExistingConnectionNamesList(), "seamgen-connection"));
-
- Properties seamGenProperties = getSeamGenProperties( launch2.getLaunchConfiguration() );
-
- if(seamGenProperties!=null) {
- connection.setDatabaseName("SeamGen database");
- connection.setURL(seamGenProperties.getProperty( "hibernate.connection.url", "" ));
- connection.setDriverClassName(seamGenProperties.getProperty( "hibernate.connection.driver_class", "" ));
- connection.setLoadingPath(seamGenProperties.getProperty( "driver.jar", "" ));
- connection.setUserName( seamGenProperties.getProperty( "hibernate.connection.username", "" ) );
- connection.setPassword( seamGenProperties.getProperty( "hibernate.connection.password", "" ) );
- connection.setCustomProperty( "JDBC_DRIVER","Other");
- try {
- connection.saveConnectionInfo();
- }
- catch (Exception e) {
- SeamGenPlugin.logError( "Could not save connection info", e);
- }
- } else {
- MessageDialog.openError( getShell(), "Could not read database settings", "Could not read database settings. See Error log for details" );
- }
+// Properties seamGenProperties = getSeamGenProperties( launch2.getLaunchConfiguration() );
+//
+// if(seamGenProperties!=null) {
+// connection.setDatabaseName("SeamGen database");
+// connection.setURL(seamGenProperties.getProperty( "hibernate.connection.url", "" ));
+// connection.setDriverClassName(seamGenProperties.getProperty( "hibernate.connection.driver_class", "" ));
+// connection.setLoadingPath(seamGenProperties.getProperty( "driver.jar", "" ));
+// connection.setUserName( seamGenProperties.getProperty( "hibernate.connection.username", "" ) );
+// connection.setPassword( seamGenProperties.getProperty( "hibernate.connection.password", "" ) );
+// connection.setCustomProperty( "JDBC_DRIVER","Other");
+// try {
+// connection.saveConnectionInfo();
+// }
+// catch (Exception e) {
+// SeamGenPlugin.logError( "Could not save connection info", e);
+// }
+// } else {
+// MessageDialog.openError( getShell(), "Could not read database settings", "Could not read database settings. See Error log for details" );
+// }
17 years, 6 months
JBoss Tools SVN: r2153 - in trunk/hibernatetools/plugins/org.hibernate.eclipse: src/org/hibernate/console and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2007-06-21 05:13:35 -0400 (Thu, 21 Jun 2007)
New Revision: 2153
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse/META-INF/MANIFEST.MF
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java
Log:
fix manifest.mf issues and bad if statement
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/META-INF/MANIFEST.MF
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse/META-INF/MANIFEST.MF 2007-06-19 12:26:09 UTC (rev 2152)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse/META-INF/MANIFEST.MF 2007-06-21 09:13:35 UTC (rev 2153)
@@ -43,8 +43,6 @@
Bundle-Localization: plugin
Export-Package: EDU.oswego.cs.dl.util.concurrent,
META-INF,
- META-INF.maven.jtidy.jtidy,
- META-INF.services,
antlr,
antlr.ASdebug,
antlr.actions.cpp,
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java 2007-06-19 12:26:09 UTC (rev 2152)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java 2007-06-21 09:13:35 UTC (rev 2153)
@@ -190,8 +190,9 @@
Properties properties = prefs.getProperties();
if(properties!=null) {
+ // in case the transaction manager is empty then we need to inject a faketm since hibernate will still try and instantiate it.
String str = properties.getProperty( "hibernate.transaction.manager_lookup_class" );
- if(StringHelper.isEmpty( str )) {
+ if(str != null && StringHelper.isEmpty( str )) {
properties.setProperty( "hibernate.transaction.manager_lookup_class", "org.hibernate.console.FakeTransactionManagerLookup");
}
}
17 years, 6 months
JBoss Tools SVN: r2152 - trunk/documentation/GettingStartedGuide/docs/userguide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: afedosik
Date: 2007-06-19 08:26:09 -0400 (Tue, 19 Jun 2007)
New Revision: 2152
Modified:
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GettingStartedForCreatingaJSFApplication.xml
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GettingStartedGuideforJSFwithHibernate.xml
Log:
some minor bugs
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GettingStartedForCreatingaJSFApplication.xml
===================================================================
--- trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GettingStartedForCreatingaJSFApplication.xml 2007-06-19 09:12:18 UTC (rev 2151)
+++ trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GettingStartedForCreatingaJSFApplication.xml 2007-06-19 12:26:09 UTC (rev 2152)
@@ -166,7 +166,7 @@
<?dbhtml filename="EditingTheJSPViewFiles.html"?>
<title>Editing the JSP View Files</title>
-<para>Now we will finish editing the JSP files for our two "views" using Exadel's JSP Visual Page</para>
+<para>Now we will finish editing the JSP files for our two "views" using Red Hat JSP Visual Page</para>
<section id="Inputname.jsp">
<title>inputname.jsp</title>
<itemizedlist continuation="continues">
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GettingStartedGuideforJSFwithHibernate.xml
===================================================================
--- trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GettingStartedGuideforJSFwithHibernate.xml 2007-06-19 09:12:18 UTC (rev 2151)
+++ trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GettingStartedGuideforJSFwithHibernate.xml 2007-06-19 12:26:09 UTC (rev 2152)
@@ -81,7 +81,7 @@
<section id="ConvertingforUseWithaDatabase">
<?dbhtml filename="ConvertingforUseWithaDatabase.html"?><title>Converting for Use With a Database</title>
-<para>Now we are ready to convert this application to use with a database with the help of ExadelStudio. To convert the application for use with a database, we need to set things up in three different places:</para>
+<para>Now we are ready to convert this application to use with a database with the help of Red Hat Developer Studio. To convert the application for use with a database, we need to set things up in three different places:</para>
<itemizedlist><listitem><para>The Application</para></listitem></itemizedlist>
@@ -98,7 +98,7 @@
the object/relational mapping from our simple object model to a database schema after adding Hibernate
capabilities to our project.</para>
<itemizedlist continuation="continues">
-<listitem><para>Right-click on ormHibernate3-jsf in the Package Explorer view and select Exadel</para></listitem>
+<listitem><para>Right-click on ormHibernate3-jsf in the Package Explorer view and select Red Hat</para></listitem>
<listitem><para>Studio/Add Hibernate Capability... from the context menu.</para></listitem>
<listitem><para>Click on Yes in the the dialog box with Add Hibernate Jars selected.</para></listitem>
<listitem><para>In the Configuration Wizard, click twice in the Value field for dialect and select org.hibernate.dialect.HSQLDialect from the pop-up menu.</para></listitem>
@@ -124,11 +124,8 @@
<programlisting role="XML"><![CDATA[<property
-name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</
-property>
-<property
-name="hibernate.connection.url">jdbc:hsqldb:hsql:[hostname]</
-property>
+name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
+<property name="hibernate.connection.url">jdbc:hsqldb:hsql:[hostname]</property>
]]></programlisting>
<para>With this single line:</para>
17 years, 6 months
JBoss Tools SVN: r2151 - trunk/core/plugins/org.jboss.ide.eclipse.jdt.ws.core/META-INF.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2007-06-19 05:12:18 -0400 (Tue, 19 Jun 2007)
New Revision: 2151
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.jdt.ws.core/META-INF/MANIFEST.MF
Log:
EXIN-334 axis.enum package not available anymore
Modified: trunk/core/plugins/org.jboss.ide.eclipse.jdt.ws.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.jdt.ws.core/META-INF/MANIFEST.MF 2007-06-19 09:09:38 UTC (rev 2150)
+++ trunk/core/plugins/org.jboss.ide.eclipse.jdt.ws.core/META-INF/MANIFEST.MF 2007-06-19 09:12:18 UTC (rev 2151)
@@ -64,7 +64,6 @@
org.apache.axis.description,
org.apache.axis.encoding,
org.apache.axis.encoding.ser,
- org.apache.axis.enum,
org.apache.axis.handlers,
org.apache.axis.handlers.http,
org.apache.axis.handlers.soap,
17 years, 6 months
JBoss Tools SVN: r2150 - trunk/core/plugins/org.jboss.ide.eclipse.jdt.ui/src/main/org/jboss/ide/eclipse/jdt/ui/editors.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2007-06-19 05:09:38 -0400 (Tue, 19 Jun 2007)
New Revision: 2150
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.jdt.ui/src/main/org/jboss/ide/eclipse/jdt/ui/editors/AnnotationHover.java
Log:
EXIN-333 HTMLPrinter moved packaged
Modified: trunk/core/plugins/org.jboss.ide.eclipse.jdt.ui/src/main/org/jboss/ide/eclipse/jdt/ui/editors/AnnotationHover.java
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.jdt.ui/src/main/org/jboss/ide/eclipse/jdt/ui/editors/AnnotationHover.java 2007-06-18 22:14:46 UTC (rev 2149)
+++ trunk/core/plugins/org.jboss.ide.eclipse.jdt.ui/src/main/org/jboss/ide/eclipse/jdt/ui/editors/AnnotationHover.java 2007-06-19 09:09:38 UTC (rev 2150)
@@ -28,7 +28,7 @@
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jdt.internal.ui.JavaUIMessages;
-import org.eclipse.jdt.internal.ui.text.HTMLPrinter;
+import org.eclipse.jface.internal.text.html.HTMLPrinter;
import org.eclipse.jface.text.source.IAnnotationHover;
import org.eclipse.jface.text.source.IAnnotationModel;
import org.eclipse.jface.text.source.ISourceViewer;
17 years, 6 months