JBoss Tools SVN: r5510 - trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test.
by jbosstools-commits@lists.jboss.org
Author: sdzmitrovich
Date: 2008-01-04 09:38:02 -0500 (Fri, 04 Jan 2008)
New Revision: 5510
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java
Log:
update comments
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java 2008-01-04 14:37:13 UTC (rev 5509)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java 2008-01-04 14:38:02 UTC (rev 5510)
@@ -1,12 +1,12 @@
-/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ * Red Hat, Inc. - initial API and implementation
******************************************************************************/
package org.jboss.tools.jsf.vpe.jsf.test;
17 years
JBoss Tools SVN: r5509 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template.
by jbosstools-commits@lists.jboss.org
Author: sdzmitrovich
Date: 2008-01-04 09:37:13 -0500 (Fri, 04 Jan 2008)
New Revision: 5509
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/JsfRadioSelectItemTemplate.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/JsfSelectManyListbox.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/JsfSelectOneListbox.java
Log:
update comments
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/JsfRadioSelectItemTemplate.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/JsfRadioSelectItemTemplate.java 2008-01-04 12:40:00 UTC (rev 5508)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/JsfRadioSelectItemTemplate.java 2008-01-04 14:37:13 UTC (rev 5509)
@@ -1,13 +1,13 @@
-/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
+/*******************************************************************************
+* Copyright (c) 2007 Red Hat, Inc.
+* Distributed under license by Red Hat, Inc. All rights reserved.
+* This program is made available under the terms of the
+* Eclipse Public License v1.0 which accompanies this distribution,
+* and is available at http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+* Red Hat, Inc. - initial API and implementation
+******************************************************************************/
package org.jboss.tools.vpe.editor.template;
import org.eclipse.wst.xml.core.internal.document.ElementImpl;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/JsfSelectManyListbox.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/JsfSelectManyListbox.java 2008-01-04 12:40:00 UTC (rev 5508)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/JsfSelectManyListbox.java 2008-01-04 14:37:13 UTC (rev 5509)
@@ -1,13 +1,13 @@
-/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
+/*******************************************************************************
+* Copyright (c) 2007 Red Hat, Inc.
+* Distributed under license by Red Hat, Inc. All rights reserved.
+* This program is made available under the terms of the
+* Eclipse Public License v1.0 which accompanies this distribution,
+* and is available at http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+* Red Hat, Inc. - initial API and implementation
+******************************************************************************/
package org.jboss.tools.vpe.editor.template;
import java.util.ArrayList;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/JsfSelectOneListbox.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/JsfSelectOneListbox.java 2008-01-04 12:40:00 UTC (rev 5508)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/JsfSelectOneListbox.java 2008-01-04 14:37:13 UTC (rev 5509)
@@ -1,13 +1,13 @@
-/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
+/*******************************************************************************
+* Copyright (c) 2007 Red Hat, Inc.
+* Distributed under license by Red Hat, Inc. All rights reserved.
+* This program is made available under the terms of the
+* Eclipse Public License v1.0 which accompanies this distribution,
+* and is available at http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+* Red Hat, Inc. - initial API and implementation
+******************************************************************************/
package org.jboss.tools.vpe.editor.template;
import java.util.ArrayList;
17 years
JBoss Tools SVN: r5508 - trunk/jsf/docs/userguide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ykryvinchanka
Date: 2008-01-04 07:40:00 -0500 (Fri, 04 Jan 2008)
New Revision: 5508
Modified:
trunk/jsf/docs/userguide/en/modules/palette.xml
Log:
http://jira.jboss.com/jira/browse/JBDS-226 (Screens retaken with 96 resolution) Scale param is defined
Modified: trunk/jsf/docs/userguide/en/modules/palette.xml
===================================================================
--- trunk/jsf/docs/userguide/en/modules/palette.xml 2008-01-04 12:37:45 UTC (rev 5507)
+++ trunk/jsf/docs/userguide/en/modules/palette.xml 2008-01-04 12:40:00 UTC (rev 5508)
@@ -50,25 +50,34 @@
<?dbhtml filename="JBossToolsPalette.html"?>
<title>JBoss Tools Palette</title>
- <para> In the Palette Editor window(Figure 5.1. "Palette Editor") we can see that every
+ <para> In the Palette Editor window we can see that every
group contains its own subgroups. For example, JSF includes Core, Facelets, HTML.
So, in the Palette every group has the next view: <Group name>
<Subgroup name>. </para>
<figure>
- <title>JBoss Tools Palette</title>
+ <title>Subgroups of JSF group</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/palette/pallete_1.png"/>
+ <imagedata fileref="images/palette/palette_24.png"/>
</imageobject>
</mediaobject>
</figure>
<para>By default the Palette is represented in Web Development Perspective with four
- groups(Figure 5.2. "JBoss Tools Palette"). If you can't see it, select <emphasis>
+ groups. If you can't see it, select <emphasis>
<property>Window > Show View Other... > JBoos Tools Web >
JBoss Tools Palette</property>
</emphasis> from the menu bar.</para>
+
+ <figure>
+ <title>JBoss Tools Palette</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/palette/palette_1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
<para>By using <property>Show/Hide</property> button you can add any predefined group of
tag libraries. It's also possible to create your own group. </para>
@@ -91,7 +100,7 @@
<title>Inserting Tag</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/palette/pallete_2.png"/>
+ <imagedata fileref="images/palette/palette_2.png" scale="80"/>
</imageobject>
</mediaobject>
</figure>
@@ -114,7 +123,7 @@
<title>Cursor position</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/palette/palette_16.png"/>
+ <imagedata fileref="images/palette/palette_16.png" scale="50"/>
</imageobject>
</mediaobject>
</figure>
@@ -157,7 +166,7 @@
<title>Web Projects View</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/palette/pallete_3.png"/>
+ <imagedata fileref="images/palette/palette_3.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -171,7 +180,7 @@
<title>Import Tags From TLD File Form</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/palette/pallete_4.png"/>
+ <imagedata fileref="images/palette/palette_4.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -182,7 +191,7 @@
<title>JBoss Tools Palette with New Tag Library</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/palette/pallete_5.png"/>
+ <imagedata fileref="images/palette/palette_5.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -197,7 +206,7 @@
<title>Import Button</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/palette/pallete_6.png"/>
+ <imagedata fileref="images/palette/palette_6.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -208,7 +217,7 @@
<title>Import Tags From TLD File Form</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/palette/pallete_7.png"/>
+ <imagedata fileref="images/palette/palette_7.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -217,7 +226,7 @@
<title>Select TLD File</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/palette/pallete_8.png"/>
+ <imagedata fileref="images/palette/palette_8.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -247,7 +256,7 @@
<title>Palette Buttons</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/palette/pallete_9.png"/>
+ <imagedata fileref="images/palette/palette_9.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -366,7 +375,7 @@
<title>Show/Hide Button</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/palette/pallete_10.png"/>
+ <imagedata fileref="images/palette/palette_10.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -381,7 +390,7 @@
<title>Show/Hide Drawers</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/palette/pallete_11.png"/>
+ <imagedata fileref="images/palette/palette_11.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -396,7 +405,7 @@
<title>New Added Groups</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/palette/pallete_12.png"/>
+ <imagedata fileref="images/palette/palette_12.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -425,7 +434,7 @@
<title>Rich Faces Components</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/palette/pallete_13.png"/>
+ <imagedata fileref="images/palette/palette_13.png"/>
</imageobject>
</mediaobject>
</figure>
17 years
JBoss Tools SVN: r5507 - trunk/jsf/docs/userguide/en/images/palette.
by jbosstools-commits@lists.jboss.org
Author: ykryvinchanka
Date: 2008-01-04 07:37:45 -0500 (Fri, 04 Jan 2008)
New Revision: 5507
Added:
trunk/jsf/docs/userguide/en/images/palette/palette_1.png
trunk/jsf/docs/userguide/en/images/palette/palette_10.png
trunk/jsf/docs/userguide/en/images/palette/palette_11.png
trunk/jsf/docs/userguide/en/images/palette/palette_12.png
trunk/jsf/docs/userguide/en/images/palette/palette_13.png
trunk/jsf/docs/userguide/en/images/palette/palette_2.png
trunk/jsf/docs/userguide/en/images/palette/palette_24.png
trunk/jsf/docs/userguide/en/images/palette/palette_3.png
trunk/jsf/docs/userguide/en/images/palette/palette_5.png
trunk/jsf/docs/userguide/en/images/palette/palette_6.png
trunk/jsf/docs/userguide/en/images/palette/palette_7.png
trunk/jsf/docs/userguide/en/images/palette/palette_8.png
trunk/jsf/docs/userguide/en/images/palette/palette_9.png
Removed:
trunk/jsf/docs/userguide/en/images/palette/Cursor_position.png
trunk/jsf/docs/userguide/en/images/palette/PaletteEditor.png
trunk/jsf/docs/userguide/en/images/palette/PaletteEditor2.png
trunk/jsf/docs/userguide/en/images/palette/PaletteEditor3.png
trunk/jsf/docs/userguide/en/images/palette/PaletteEditor4.png
trunk/jsf/docs/userguide/en/images/palette/PaletteEditor5.png
trunk/jsf/docs/userguide/en/images/palette/PaletteEditor6.png
trunk/jsf/docs/userguide/en/images/palette/PaletteEditor7.png
trunk/jsf/docs/userguide/en/images/palette/PaletteEditor8.png
trunk/jsf/docs/userguide/en/images/palette/PaletteEditor9.png
trunk/jsf/docs/userguide/en/images/palette/pallete_1.png
trunk/jsf/docs/userguide/en/images/palette/pallete_10.png
trunk/jsf/docs/userguide/en/images/palette/pallete_11.png
trunk/jsf/docs/userguide/en/images/palette/pallete_12.png
trunk/jsf/docs/userguide/en/images/palette/pallete_13.png
trunk/jsf/docs/userguide/en/images/palette/pallete_2.png
trunk/jsf/docs/userguide/en/images/palette/pallete_3.png
trunk/jsf/docs/userguide/en/images/palette/pallete_4.png
trunk/jsf/docs/userguide/en/images/palette/pallete_5.png
trunk/jsf/docs/userguide/en/images/palette/pallete_6.png
trunk/jsf/docs/userguide/en/images/palette/pallete_7.png
trunk/jsf/docs/userguide/en/images/palette/pallete_8.png
trunk/jsf/docs/userguide/en/images/palette/pallete_9.png
Log:
http://jira.jboss.com/jira/browse/JBDS-232 http://jira.jboss.com/jira/browse/JBDS-226 Update information about the palette + retaken with 96 resolution
Deleted: trunk/jsf/docs/userguide/en/images/palette/Cursor_position.png
===================================================================
(Binary files differ)
Deleted: trunk/jsf/docs/userguide/en/images/palette/PaletteEditor.png
===================================================================
(Binary files differ)
Deleted: trunk/jsf/docs/userguide/en/images/palette/PaletteEditor2.png
===================================================================
(Binary files differ)
Deleted: trunk/jsf/docs/userguide/en/images/palette/PaletteEditor3.png
===================================================================
(Binary files differ)
Deleted: trunk/jsf/docs/userguide/en/images/palette/PaletteEditor4.png
===================================================================
(Binary files differ)
Deleted: trunk/jsf/docs/userguide/en/images/palette/PaletteEditor5.png
===================================================================
(Binary files differ)
Deleted: trunk/jsf/docs/userguide/en/images/palette/PaletteEditor6.png
===================================================================
(Binary files differ)
Deleted: trunk/jsf/docs/userguide/en/images/palette/PaletteEditor7.png
===================================================================
(Binary files differ)
Deleted: trunk/jsf/docs/userguide/en/images/palette/PaletteEditor8.png
===================================================================
(Binary files differ)
Deleted: trunk/jsf/docs/userguide/en/images/palette/PaletteEditor9.png
===================================================================
(Binary files differ)
Added: trunk/jsf/docs/userguide/en/images/palette/palette_1.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/userguide/en/images/palette/palette_1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/userguide/en/images/palette/palette_10.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/userguide/en/images/palette/palette_10.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/userguide/en/images/palette/palette_11.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/userguide/en/images/palette/palette_11.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/userguide/en/images/palette/palette_12.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/userguide/en/images/palette/palette_12.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/userguide/en/images/palette/palette_13.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/userguide/en/images/palette/palette_13.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/userguide/en/images/palette/palette_2.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/userguide/en/images/palette/palette_2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/userguide/en/images/palette/palette_24.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/userguide/en/images/palette/palette_24.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/userguide/en/images/palette/palette_3.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/userguide/en/images/palette/palette_3.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/userguide/en/images/palette/palette_5.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/userguide/en/images/palette/palette_5.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/userguide/en/images/palette/palette_6.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/userguide/en/images/palette/palette_6.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/userguide/en/images/palette/palette_7.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/userguide/en/images/palette/palette_7.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/userguide/en/images/palette/palette_8.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/userguide/en/images/palette/palette_8.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/userguide/en/images/palette/palette_9.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/userguide/en/images/palette/palette_9.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: trunk/jsf/docs/userguide/en/images/palette/pallete_1.png
===================================================================
(Binary files differ)
Deleted: trunk/jsf/docs/userguide/en/images/palette/pallete_10.png
===================================================================
(Binary files differ)
Deleted: trunk/jsf/docs/userguide/en/images/palette/pallete_11.png
===================================================================
(Binary files differ)
Deleted: trunk/jsf/docs/userguide/en/images/palette/pallete_12.png
===================================================================
(Binary files differ)
Deleted: trunk/jsf/docs/userguide/en/images/palette/pallete_13.png
===================================================================
(Binary files differ)
Deleted: trunk/jsf/docs/userguide/en/images/palette/pallete_2.png
===================================================================
(Binary files differ)
Deleted: trunk/jsf/docs/userguide/en/images/palette/pallete_3.png
===================================================================
(Binary files differ)
Deleted: trunk/jsf/docs/userguide/en/images/palette/pallete_4.png
===================================================================
(Binary files differ)
Deleted: trunk/jsf/docs/userguide/en/images/palette/pallete_5.png
===================================================================
(Binary files differ)
Deleted: trunk/jsf/docs/userguide/en/images/palette/pallete_6.png
===================================================================
(Binary files differ)
Deleted: trunk/jsf/docs/userguide/en/images/palette/pallete_7.png
===================================================================
(Binary files differ)
Deleted: trunk/jsf/docs/userguide/en/images/palette/pallete_8.png
===================================================================
(Binary files differ)
Deleted: trunk/jsf/docs/userguide/en/images/palette/pallete_9.png
===================================================================
(Binary files differ)
17 years
JBoss Tools SVN: r5506 - trunk/jsf/docs/userguide/en/images/palette.
by jbosstools-commits@lists.jboss.org
Author: ykryvinchanka
Date: 2008-01-04 07:35:12 -0500 (Fri, 04 Jan 2008)
New Revision: 5506
Modified:
trunk/jsf/docs/userguide/en/images/palette/palette_14.png
trunk/jsf/docs/userguide/en/images/palette/palette_15.png
trunk/jsf/docs/userguide/en/images/palette/palette_17.png
trunk/jsf/docs/userguide/en/images/palette/palette_18.png
trunk/jsf/docs/userguide/en/images/palette/palette_19.png
trunk/jsf/docs/userguide/en/images/palette/palette_20.png
trunk/jsf/docs/userguide/en/images/palette/palette_21.png
trunk/jsf/docs/userguide/en/images/palette/palette_22.png
trunk/jsf/docs/userguide/en/images/palette/palette_23.png
trunk/jsf/docs/userguide/en/images/palette/palette_4.png
Log:
http://jira.jboss.com/jira/browse/JBDS-232 http://jira.jboss.com/jira/browse/JBDS-226 Update information about the palette + retaken with 96 resolution
Modified: trunk/jsf/docs/userguide/en/images/palette/palette_14.png
===================================================================
(Binary files differ)
Modified: trunk/jsf/docs/userguide/en/images/palette/palette_15.png
===================================================================
(Binary files differ)
Modified: trunk/jsf/docs/userguide/en/images/palette/palette_17.png
===================================================================
(Binary files differ)
Modified: trunk/jsf/docs/userguide/en/images/palette/palette_18.png
===================================================================
(Binary files differ)
Modified: trunk/jsf/docs/userguide/en/images/palette/palette_19.png
===================================================================
(Binary files differ)
Modified: trunk/jsf/docs/userguide/en/images/palette/palette_20.png
===================================================================
(Binary files differ)
Modified: trunk/jsf/docs/userguide/en/images/palette/palette_21.png
===================================================================
(Binary files differ)
Modified: trunk/jsf/docs/userguide/en/images/palette/palette_22.png
===================================================================
(Binary files differ)
Modified: trunk/jsf/docs/userguide/en/images/palette/palette_23.png
===================================================================
(Binary files differ)
Modified: trunk/jsf/docs/userguide/en/images/palette/palette_4.png
===================================================================
(Binary files differ)
17 years
JBoss Tools SVN: r5505 - trunk/hibernatetools/docs/reference/en/modules.
by jbosstools-commits@lists.jboss.org
Author: afedosik
Date: 2008-01-04 06:20:31 -0500 (Fri, 04 Jan 2008)
New Revision: 5505
Modified:
trunk/hibernatetools/docs/reference/en/modules/ant.xml
trunk/hibernatetools/docs/reference/en/modules/codegen.xml
trunk/hibernatetools/docs/reference/en/modules/codegenarchitecture.xml
trunk/hibernatetools/docs/reference/en/modules/plugins.xml
trunk/hibernatetools/docs/reference/en/modules/reverseengineering.xml
trunk/hibernatetools/docs/reference/en/modules/setup.xml
Log:
Spelling and grammer in Guide are corrected.
[ Show ?\194?\187 ]
Catherine Luts [03/Jan/08 07:42 AM] Spelling and grammer in Guide are corrected.
Modified: trunk/hibernatetools/docs/reference/en/modules/ant.xml
===================================================================
--- trunk/hibernatetools/docs/reference/en/modules/ant.xml 2008-01-04 11:01:05 UTC (rev 5504)
+++ trunk/hibernatetools/docs/reference/en/modules/ant.xml 2008-01-04 11:20:31 UTC (rev 5505)
@@ -12,17 +12,17 @@
from tools.hibernate.org The <emphasis>
<property>hibernate-tools.jar</property>
</emphasis> is located in your eclipse plugins directory at <emphasis>
- <property>/plugins/org.hibernate.eclipse.x.x.x/lib/tools/hibernate-tools.jar.
+ <property>/plugins/org.hibernate.eclipse.x.x.x/lib/tools/hibernate-tools.jar
</property>
</emphasis></para>
- <para>This jar is 100% independent from the eclipse platform and can thus be used
+ <para>. This jar is 100% independent from the eclipse platform and can thus be used
independently of eclipse.</para>
<note>
- <para>There might be incompabilities with respect to the Hibernate3.jar bundled with the tools
+ <para>There might be incapabilities with respect to the Hibernate3.jar bundled with the tools
and your own jar. Thus to avoid any confusion it is recommended to use the hibernate3.jar
& hibernate-annotations.jar bundled with the tools when you want to use the Ant
- tasks. Do not worry about using e.g. Hibernate 3.2 jar's with e.g. an Hibernate 3.1 project
+ tasks. Do not worry about using e.g. Hibernate 3.2 jar's with e.g. a Hibernate 3.1 project
since the output generated will work with previous Hibernate 3 versions. </para>
</note>
</section>
@@ -46,11 +46,11 @@
classpathref="toolslib" />
]]></programlisting></para>
- <para>this <emphasis>
+ <para>This <emphasis>
<property>
<literal><taskdef></literal>
</property>
- </emphasis> defines a Ant task called <emphasis>
+ </emphasis> defines an Ant task called <emphasis>
<property>
<literal><hibernatetool></literal>
</property>
@@ -101,12 +101,12 @@
<calloutlist>
<callout arearefs="ht1">
<para><literal>destdir</literal> (required): destination directory for files generated
- with exporters.</para>
+ with exporters</para>
</callout>
<callout arearefs="ht2">
<para><literal>templatepath</literal> (optional): A path to be used to look up
- user-edited templates.</para>
+ user-edited templates</para>
</callout>
<callout arearefs="ht3">
@@ -122,7 +122,7 @@
<callout arearefs="ht5">
<para>One of 4 different ways of configuring the Hibernate Meta Model must be
- specified.</para>
+ specified</para>
</callout>
<callout arearefs="ht6">
@@ -138,9 +138,9 @@
<para>The following example shows the most basic setup for generating pojo's via
<literal>hbm2java</literal> from a normal <emphasis>
<property>
- <literal>hibernate.cfg.xml.</literal>
+ <literal>hibernate.cfg.xml</literal>
</property>
- </emphasis> The output will be put in the <emphasis>
+ </emphasis>. The output will be put in the <emphasis>
<property>${build.dir}/generated</property></emphasis>
directory.</para>
@@ -188,7 +188,7 @@
<section>
<title>Hibernate Configurations</title>
- <para><literal>hibernatetool</literal> supports four different Hibernate configurations: A
+ <para><literal>Hibernatetool</literal> supports four different Hibernate configurations: A
standard Hibernate configuration (<emphasis>
<property><configuration></property>
</emphasis>), Annotation based configuration (<emphasis>
@@ -315,7 +315,7 @@
<property><taskdef></property></emphasis>.</para>
<para>The <emphasis>
- <property><annotationconfiguration></property></emphasis> supports the same attributes as an
+ <property><annotationconfiguration></property></emphasis> supports the same attributes as a
<emphasis>
<property><configuration></property></emphasis> except that the configurationfile attribute is now required as
that is from where an <literal>AnnotationConfiguration</literal> gets the list of
@@ -338,14 +338,14 @@
<section>
<title>JPA based configuration (<jpaconfiguration>)</title>
- <para>An <emphasis>
+ <para>A <emphasis>
<property><jpaconfiguration></property></emphasis> is used when you want to read the metamodel from
JPA/Hibernate Annotation where you want to use the auto-scan configuration as defined in the
JPA spec (part of EJB3). In other words, when you do not have a
<emphasis>
<property>hibernate.cfg.xml</property></emphasis>, but instead have a setup where you use a
<emphasis>
- <property>persistence.xml</property></emphasis> packaged in an JPA compliant manner.</para>
+ <property>persistence.xml</property></emphasis> packaged in a JPA compliant manner.</para>
<para><literal><jpaconfiguration></literal> will simply just try and
auto-configure it self based on the available classpath, e.g. look for
@@ -354,10 +354,10 @@
<para>The <literal>persistenceunit</literal> attribute can be used to select a specific
persistence unit. If no persistenceunit is specified it will automatically search for one
- and if a unique one is found use it, but if multiple persistence units are available it will
+ and if an unique one is found use it, but if multiple persistence units are available it will
error.</para>
- <para>To use an <emphasis>
+ <para>To use a <emphasis>
<property><jpaconfiguration></property></emphasis> you will need to specify some additional jars
from Hibernate EntityManager in the <emphasis>
<property><taskdef></property></emphasis> of the hibernatetool. The
@@ -721,7 +721,7 @@
<callout arearefs="qcfg1">
<para>ejb3 (default: false): the generated cfg.xml will have <mapping
class=".."/>, opposed to <mapping resource="..."/> for each
- mapping.</para>
+ mapping</para>
</callout>
</calloutlist>
</programlistingco>
@@ -792,7 +792,7 @@
<section id="hbmtemplate">
<title>Generic Hibernate metamodel exporter (<literal><hbmtemplate></literal>)</title>
- <para>Generic exporter that can be controlled by a user provided template or class.</para>
+ <para>Generic exporter that can be controlled by an user provided template or class.</para>
<programlisting><![CDATA[<hbmtemplate
filepattern="{package-name}/{class-name}.ftl"
@@ -852,7 +852,7 @@
<property><property></property></emphasis> allows you bind a string value to a key. The value will be
available in the templates via $<key>. The following example will assign the
string value <emphasis>
- <property>"true"</property></emphasis> to the variable <literal>$descriptors</literal></para>
+ <property>"true"</property></emphasis> to the variable <literal>$descriptors.</literal></para>
<programlisting><![CDATA[<property key="descriptors" value="true"/>]]></programlisting>
Modified: trunk/hibernatetools/docs/reference/en/modules/codegen.xml
===================================================================
--- trunk/hibernatetools/docs/reference/en/modules/codegen.xml 2008-01-04 11:01:05 UTC (rev 5504)
+++ trunk/hibernatetools/docs/reference/en/modules/codegen.xml 2008-01-04 11:20:31 UTC (rev 5505)
@@ -288,7 +288,7 @@
</class>
</hibernate-mapping></programlisting>
- <para>and for <emphasis>
+ <para>And for <emphasis>
<property>Event.hbm</property></emphasis> file:</para>
<programlisting><hibernate-mapping>
@@ -317,7 +317,7 @@
will include the other part (if at all) in the
<literal>toString()/equals()</literal> methods. Therefore it is not a
good practice to put at class scope such meta attributes, unless you
- are defining a class without bi-directional associations</para>
+ are defining a class without bi-directional associations.</para>
<para>We recomend instead to add the <literal>meta</literal>
attributes at the property level:</para>
@@ -426,7 +426,7 @@
accessors for pojo's.</para>
<para>Extract the <emphasis>
- <property>PojoPropertyAccessor.ftl</property></emphasis> into a
+ <property>PojoPropertyAccessor.ftl</property></emphasis> into a
local folder i.e. <emphasis>
<property>${hbm.template.path}</property></emphasis>, respecting
the whole path, for example:
@@ -495,9 +495,9 @@
</class>
</hibernate-mapping></programlisting>
- <note> <para>i) If you don'' use <literal><[[CDATA[]]></literal>
+ <note> <para>I) If you don'' use <literal><[[CDATA[]]></literal>
you have to scape the & symbol, i.e.: &amp; </para>
- <para>ii). Note that we
+ <para>II). Note that we
are referring to "firstName" directly and this is the parameter name
not the actual field name. If you want to refer the field you have to
use "this.firstName" instead. </para>
@@ -532,7 +532,7 @@
<para>Invoking the target <emphasis>
<property><hbm2java></property></emphasis> will
generate on the <emphasis>
- <property>${hbm2java.dest.dir}</property></emphasis> the file:
+ <property>${hbm2java.dest.dir}</property></emphasis> the file
<property>Person.java</property>:</para>
<programlisting>// default package
Modified: trunk/hibernatetools/docs/reference/en/modules/codegenarchitecture.xml
===================================================================
--- trunk/hibernatetools/docs/reference/en/modules/codegenarchitecture.xml 2008-01-04 11:01:05 UTC (rev 5504)
+++ trunk/hibernatetools/docs/reference/en/modules/codegenarchitecture.xml 2008-01-04 11:20:31 UTC (rev 5505)
@@ -33,7 +33,7 @@
</listitem>
<listitem>
- <para>A <emphasis>
+ <para>An <emphasis>
<property>Annotation configuration</property>
</emphasis> uses Hibernate Annotations and supports <emphasis>
<property>hbm.xml</property>
Modified: trunk/hibernatetools/docs/reference/en/modules/plugins.xml
===================================================================
--- trunk/hibernatetools/docs/reference/en/modules/plugins.xml 2008-01-04 11:01:05 UTC (rev 5504)
+++ trunk/hibernatetools/docs/reference/en/modules/plugins.xml 2008-01-04 11:20:31 UTC (rev 5505)
@@ -367,7 +367,7 @@
<entry>
<para>When enabled the project classpath will be appended to the classpath specified
- above.</para>
+ above</para>
</entry>
<entry>
@@ -569,7 +569,7 @@
<entry>
<para>The name of the console configuration which should be used when code
- generating.</para>
+ generating</para>
</entry>
</row>
@@ -606,7 +606,7 @@
<entry>
<para>The package name here is used as the default package name for any entities
- found when reverse engineering.</para>
+ found when reverse engineering</para>
</entry>
</row>
@@ -687,7 +687,7 @@
</entry>
<entry>
- <para>A path to a directory with custom templates.</para>
+ <para>A path to a directory with custom templates</para>
</entry>
</row>
</tbody>
@@ -768,7 +768,7 @@
</entry>
<entry>
- <para>Generate mapping (hbm.xml) files for each entity</para>
+ <para>Generate mapping (hbm.xml) files for each entity.</para>
</entry>
</row>
@@ -907,7 +907,7 @@
<entry>
<para>Pattern to use for the generated files, relatively for the output dir.
- Example: {package-name}/{class-name}.java</para>
+ Example: {package-name}/{class-name}.java .</para>
</entry>
</row>
@@ -919,7 +919,7 @@
</entry>
<entry>
- <para>executable to run GraphViz (only relevant, but optional for Schema
+ <para>Executable to run GraphViz (only relevant, but optional for Schema
documentation)</para>
</entry>
</row>
@@ -1068,7 +1068,7 @@
<title>Reveng.xml editor</title>
<para>A <emphasis>
- <property>reveng.xml</property></emphasis>
+ <property>reveng.xml </property></emphasis>
file is used to customize and control how reverse engineering is performed by
the tools. The plugins provide and editor to ease the editing of this file and hence used to
configure the reverse engineering process.</para>
@@ -1078,15 +1078,15 @@
default naming rules is not applicable.</para>
<para>Note that not all the features of the <emphasis>
- <property>.reveng.xml</property></emphasis> file is exposed or fully implemented in
+ <property>.reveng.xml </property></emphasis> file is exposed or fully implemented in
the editor, but the main functionality is there. To understand the full flexibility of the
<emphasis>
<property>reveng.xml</property></emphasis>, please see <xref linkend="hibernaterevengxmlfile"/></para>
<para>The editor is activated as soon as an <emphasis>
- <property>.reveng.xml</property></emphasis> file is opened. To get an initial
+ <property>.reveng.xml </property></emphasis> file is opened. To get an initial
<emphasis>
- <property>reveng.xml</property></emphasis> file the reveng.xml wizard can be started via <emphasis>
+ <property>reveng.xml </property></emphasis> file the reveng.xml wizard can be started via <emphasis>
<property>Ctrl+N</property></emphasis> or via the code generation
launcher.</para>
@@ -1190,7 +1190,7 @@
</figure>
<para><property>Hibernate Console</property> perspective shows entity structure, query editor and
- result</para>
+ result.</para>
<para>The console configuration does not dynamically adjust to changes done in mappings and
@@ -1202,7 +1202,7 @@
<title>Mapping Diagram</title>
<para>A mapping diagram for entities are available by right clicking on the entity you want
- an mapping diagram for and then choose <emphasis>
+ a mapping diagram for and then choose <emphasis>
<property>Open Mapping Diagram</property></emphasis></para>
<figure>
Modified: trunk/hibernatetools/docs/reference/en/modules/reverseengineering.xml
===================================================================
--- trunk/hibernatetools/docs/reference/en/modules/reverseengineering.xml 2008-01-04 11:01:05 UTC (rev 5504)
+++ trunk/hibernatetools/docs/reference/en/modules/reverseengineering.xml 2008-01-04 11:20:31 UTC (rev 5505)
@@ -129,7 +129,7 @@
<programlisting><![CDATA[<schema-selection/>]]></programlisting>
- <para>which in turn is equal to:</para>
+ <para>Which in turn is equal to:</para>
<programlisting><![CDATA[<schema-selection match-catalog=".*" match-schema=".*" match-table=".*"/>]]></programlisting>
@@ -309,7 +309,7 @@
<entry>java.lang.Character</entry>
<entry>The most specific VARCHAR with not-null="true" is
- selected.</entry>
+ selected</entry>
</row>
<row>
@@ -445,11 +445,11 @@
<calloutlist>
<callout arearefs="tablefilter-matchcatalog">
- <para>catalog (Optional): Catalog name for table. Has to be specified if you are reverse engineering multiple catalogs or if it is not equal to <literal>hiberante.default_catalog</literal></para>
+ <para>catalog (Optional): Catalog name for table. Has to be specified if you are reverse engineering multiple catalogs or if it is not equal to <literal>hiberante.default_catalog. </literal></para>
</callout>
<callout arearefs="tablefilter-matchschema">
- <para>schema (Optional): Schema name for table. Has to be specified if you are reverse engineering multiple schemas or if it is not equal to <literal>hiberante.default_schema</literal></para>
+ <para>schema (Optional): Schema name for table. Has to be specified if you are reverse engineering multiple schemas or if it is not equal to <literal>hiberante.default_schema.</literal></para>
</callout>
<callout arearefs="tablefilter-matchname">
@@ -555,17 +555,17 @@
<callout arearefs="column-type">
<para>type (Optional): Which hibernate-type to use for this
- specific column.</para>
+ specific column</para>
</callout>
<callout arearefs="column-propertytype">
<para>property (Optional): What property name will be
- generated for this column.</para>
+ generated for this column</para>
</callout>
<callout arearefs="column-exclude">
<para>exclude (default: false): set to true if this column
- should be ignored.</para>
+ should be ignored</para>
</callout>
</calloutlist>
</programlistingco></para>
@@ -581,7 +581,7 @@
name of the resulting properties (many-to-one and
one-to-many's).</para>
- <para>Note</para>
+ <para>Note:</para>
<para><programlistingco>
<areaspec>
@@ -626,26 +626,26 @@
<callout arearefs="foreignkey-catalog">
<para>foreign-catalog (Optional): Name of the foreign table's
catalog. (Only relevant if you want to explicitly define a
- foreign key)</para>
+ foreign key).</para>
</callout>
<callout arearefs="foreignkey-schema">
<para>foreign-schema (Optional): Name of the foreign table's
schema. (Only relevant if you want to explicitly define a
- foreign key)</para>
+ foreign key).</para>
</callout>
<callout arearefs="foreignkey-table">
<para>foreign-table (Optional): Name of the foreign table.
(Only relevant if you want to explicitly define a foreign
- key)</para>
+ key).</para>
</callout>
<callout arearefs="foreignkey-columnref">
<para>column-ref (Optional): Defines that the foreign-key
constraint between a local-column and foreign-column name.
(Only relevant if you want to explicitly define a foreign
- key)</para>
+ key).</para>
</callout>
<callout arearefs="foreignkey-manytoone">
@@ -670,7 +670,7 @@
<section id="custom-reveng-strategy">
<title>Custom strategy</title>
- <para>It is possible to implement a user strategy. Such strategy must
+ <para>It is possible to implement an user strategy. Such strategy must
implement <emphasis>
<property>org.hibernate.cfg.reveng.ReverseEngineeringStrategy</property></emphasis>. It is
recommended that one uses the <property>DelegatingReverseEngineeringStrategy</property> and
Modified: trunk/hibernatetools/docs/reference/en/modules/setup.xml
===================================================================
--- trunk/hibernatetools/docs/reference/en/modules/setup.xml 2008-01-04 11:01:05 UTC (rev 5504)
+++ trunk/hibernatetools/docs/reference/en/modules/setup.xml 2008-01-04 11:20:31 UTC (rev 5505)
@@ -3,8 +3,8 @@
<title>Download and install Hibernate Tools</title>
<para><property>Hibernate Tools</property> can be used "standalone" via Ant
- 1.6.x or fully integrated into a Eclipse 3.3.x + WTP 2.x based IDE, such as <property>JBoss
- Tools</property> or an default Eclipse 3.3.x + WTP 2.x installation. The following describes
+ 1.6.x or fully integrated into an Eclipse 3.3.x + WTP 2.x based IDE, such as <property>JBoss
+ Tools</property> or a default Eclipse 3.3.x + WTP 2.x installation. The following describes
the install steps in these environments.</para>
<section>
@@ -69,7 +69,7 @@
<property>hibernate-tools.jar</property>
</emphasis> and associated libraries. The libraries are included in the distribution from the
Hibernate website and the Eclipse updatesite. The libraries are located in the eclipse plugins
- directory at <emphasis>
+ directory at <emphasis>
<property>
<literal>/plugins/org.hibernate.eclipse.x.x.x/lib/tools/.</literal>
</property>
17 years
JBoss Tools SVN: r5504 - in trunk/vpe/plugins/org.jboss.tools.vpe: src/org/jboss/tools/vpe/editor/util and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: sdzmitrovich
Date: 2008-01-04 06:01:05 -0500 (Fri, 04 Jan 2008)
New Revision: 5504
Added:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/JsfSelectManyListbox.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/JsfSelectOneListbox.java
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java
trunk/vpe/plugins/org.jboss.tools.vpe/templates/vpe-templates-jsf.xml
Log:
http://jira.jboss.com/jira/browse/JBIDE-1501
Added: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/JsfSelectManyListbox.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/JsfSelectManyListbox.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/JsfSelectManyListbox.java 2008-01-04 11:01:05 UTC (rev 5504)
@@ -0,0 +1,153 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.editor.template;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.util.HTML;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMNode;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * @author Sergey Dzmitrovich
+ *
+ * template for selectOneListbox select item
+ *
+ */
+public class JsfSelectManyListbox extends VpeAbstractTemplate {
+
+ /**
+ * "size" attribute
+ */
+ private static final String ATTR_SIZE = "size";
+
+ /**
+ * "size" attribute
+ */
+ private static final String ATTR_MULTIPLE_VALUE = "multiple";
+ /**
+ * list of visible children
+ */
+ private static List<String> CHILDREN_LIST = new ArrayList<String>();
+
+ static {
+ CHILDREN_LIST.add("selectItem");
+ CHILDREN_LIST.add("selectItems");
+ }
+
+ /**
+ * list of copied attributes
+ */
+ private static List<String> ATTR_LIST_COPY = new ArrayList<String>();
+
+ static {
+ ATTR_LIST_COPY.add("style");
+ ATTR_LIST_COPY.add("styleClass");
+ }
+
+ /**
+ *
+ */
+ public JsfSelectManyListbox() {
+
+ // TODO Auto-generated constructor stub
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.tools.vpe.editor.template.VpeTemplate#create(org.jboss.tools.vpe.editor.context.VpePageContext,
+ * org.w3c.dom.Node, org.mozilla.interfaces.nsIDOMDocument)
+ */
+ public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
+ nsIDOMDocument visualDocument) {
+
+ // create select element
+ nsIDOMElement select = visualDocument.createElement(HTML.TAG_SELECT);
+
+ Element element = (Element) sourceNode;
+
+ // import attributes from source
+ for (String attributeName : ATTR_LIST_COPY) {
+
+ // get attribute
+ String attr = element.getAttribute(attributeName);
+
+ // add attribute to "select"
+ if (attr != null)
+ select.setAttribute(HTML.ATTR_STYLE, attr);
+
+ }
+
+ // set "multiple" attribute
+ select.setAttribute(HTML.ATTR_MULTIPLE, ATTR_MULTIPLE_VALUE);
+
+ // get "size" attribute
+ String size = element.getAttribute(ATTR_SIZE);
+
+ // add "size" attribute to "select"
+ if (size != null)
+ // if source has "size" attribute import it
+ select.setAttribute(HTML.ATTR_SIZE, size);
+ else
+ // count size
+ select.setAttribute(HTML.ATTR_SIZE, String
+ .valueOf(countSize(element)));
+
+ return new VpeCreationData(select);
+ }
+
+ /**
+ * Count size for "select" (size = number of "selectItem" and "selectItems"
+ * children )
+ *
+ *
+ * @param sourceNode
+ * @return size of select (1 or more)
+ */
+ private int countSize(Node sourceNode) {
+
+ NodeList children = sourceNode.getChildNodes();
+ int size = 0;
+ for (int i = 0; i < children.getLength(); i++) {
+
+ Node child = children.item(i);
+ // if children is one of visible items
+ if (CHILDREN_LIST.contains(child.getLocalName()))
+ size++;
+ }
+ // if 'size' == 0 return 1 else 'size'
+ return size == 0 ? 1 : size;
+
+ }
+
+ /**
+ *
+ */
+ public void removeAttribute(VpePageContext pageContext,
+ Element sourceElement, nsIDOMDocument visualDocument,
+ nsIDOMNode visualNode, Object data, String name) {
+
+ // get DOMElement(root element is select)
+ nsIDOMElement select = (nsIDOMElement) visualNode
+ .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+
+ // remove attribute
+ select.removeAttribute(name);
+ }
+
+}
Added: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/JsfSelectOneListbox.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/JsfSelectOneListbox.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/JsfSelectOneListbox.java 2008-01-04 11:01:05 UTC (rev 5504)
@@ -0,0 +1,145 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.editor.template;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.util.HTML;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMNode;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * @author Sergey Dzmitrovich
+ *
+ * template for selectOneListbox select item
+ *
+ */
+public class JsfSelectOneListbox extends VpeAbstractTemplate {
+
+ /**
+ * "size" attribute
+ */
+ private static final String ATTR_SIZE = "size";
+
+ /**
+ * list of visible children
+ */
+ private static List<String> CHILDREN_LIST = new ArrayList<String>();
+
+ static {
+ CHILDREN_LIST.add("selectItem");
+ CHILDREN_LIST.add("selectItems");
+ }
+
+ /**
+ * list of copied attributes
+ */
+ private static List<String> ATTR_LIST_COPY = new ArrayList<String>();
+
+ static {
+ ATTR_LIST_COPY.add("style");
+ ATTR_LIST_COPY.add("styleClass");
+ }
+
+ /**
+ *
+ */
+ public JsfSelectOneListbox() {
+
+ // TODO Auto-generated constructor stub
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.tools.vpe.editor.template.VpeTemplate#create(org.jboss.tools.vpe.editor.context.VpePageContext,
+ * org.w3c.dom.Node, org.mozilla.interfaces.nsIDOMDocument)
+ */
+ public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
+ nsIDOMDocument visualDocument) {
+
+ // create select element
+ nsIDOMElement select = visualDocument.createElement(HTML.TAG_SELECT);
+
+ Element element = (Element) sourceNode;
+
+ // import attributes from source
+ for (String attributeName : ATTR_LIST_COPY) {
+
+ // get attribute
+ String attr = element.getAttribute(attributeName);
+
+ // add attribute to "select"
+ if (attr != null)
+ select.setAttribute(HTML.ATTR_STYLE, attr);
+
+ }
+
+ // get "size" attribute
+ String size = element.getAttribute(ATTR_SIZE);
+
+ // add "size" attribute to "select"
+ if (size != null)
+ // if source has "size" attribute import it
+ select.setAttribute(HTML.ATTR_SIZE, size);
+ else
+ // count size
+ select.setAttribute(HTML.ATTR_SIZE, String
+ .valueOf(countSize(element)));
+
+ return new VpeCreationData(select);
+ }
+
+ /**
+ * Count size for "select" (size = number of "selectItem" and "selectItems"
+ * children )
+ *
+ *
+ * @param sourceNode
+ * @return size of select (1 or more)
+ */
+ private int countSize(Node sourceNode) {
+
+ NodeList children = sourceNode.getChildNodes();
+ int size = 0;
+ for (int i = 0; i < children.getLength(); i++) {
+
+ Node child = children.item(i);
+ // if children is one of visible items
+ if (CHILDREN_LIST.contains(child.getLocalName()))
+ size++;
+ }
+ // if 'size' == 0 return 1 else 'size'
+ return size == 0 ? 1 : size;
+
+ }
+
+ /**
+ *
+ */
+ public void removeAttribute(VpePageContext pageContext,
+ Element sourceElement, nsIDOMDocument visualDocument,
+ nsIDOMNode visualNode, Object data, String name) {
+
+ // get DOMElement(root element is select)
+ nsIDOMElement select = (nsIDOMElement) visualNode
+ .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+
+ // remove attribute
+ select.removeAttribute(name);
+ }
+}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java 2008-01-04 01:55:08 UTC (rev 5503)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java 2008-01-04 11:01:05 UTC (rev 5504)
@@ -19,43 +19,45 @@
private HTML() {}
- public static final String TAG_HTML = "HTML";
- public static final String TAG_HEAD = "HEAD";
- public static final String TAG_BODY = "BODY";
- public static final String TAG_IMG = "IMG";
- public static final String TAG_LINK = "LINK";
- public static final String TAG_SELECT = "SELECT";
- public static final String TAG_OPTION = "OPTION";
- public static final String TAG_STYLE = "STYLE";
- public static final String TAG_TABLE = "TABLE";
- public static final String TAG_TBODY = "TBODY";
- public static final String TAG_THEAD = "THEAD";
- public static final String TAG_TFOOT = "TFOOT";
- public static final String TAG_TH = "TH";
- public static final String TAG_TR = "TR";
- public static final String TAG_TD = "TD";
- public static final String TAG_COL = "COL";
- public static final String TAG_COLS = "COLS";
- public static final String TAG_COLGROUP = "COLGROUP";
- public static final String TAG_BR = "BR";
- public static final String TAG_LI = "LI";
- public static final String TAG_DIV = "DIV";
- public static final String TAG_SPAN = "SPAN";
- public static final String TAG_P = "P";
- public static final String TAG_TEXTAREA = "TEXTAREA";
- public static final String TAG_INPUT = "INPUT";
- public static final String TAG_BUTTON = "BUTTON";
- public static final String TAG_OL = "OL";
- public static final String TAG_UL = "UL";
+ public static final String TAG_HTML = "HTML";
+ public static final String TAG_HEAD = "HEAD";
+ public static final String TAG_BODY = "BODY";
+ public static final String TAG_IMG = "IMG";
+ public static final String TAG_LINK = "LINK";
+ public static final String TAG_SELECT = "SELECT";
+ public static final String TAG_OPTION = "OPTION";
+ public static final String TAG_STYLE = "STYLE";
+ public static final String TAG_TABLE = "TABLE";
+ public static final String TAG_TBODY = "TBODY";
+ public static final String TAG_THEAD = "THEAD";
+ public static final String TAG_TFOOT = "TFOOT";
+ public static final String TAG_TH = "TH";
+ public static final String TAG_TR = "TR";
+ public static final String TAG_TD = "TD";
+ public static final String TAG_COL = "COL";
+ public static final String TAG_COLS = "COLS";
+ public static final String TAG_COLGROUP = "COLGROUP";
+ public static final String TAG_BR = "BR";
+ public static final String TAG_LI = "LI";
+ public static final String TAG_DIV = "DIV";
+ public static final String TAG_SPAN = "SPAN";
+ public static final String TAG_P = "P";
+ public static final String TAG_TEXTAREA = "TEXTAREA";
+ public static final String TAG_INPUT = "INPUT";
+ public static final String TAG_BUTTON = "BUTTON";
+ public static final String TAG_OL = "OL";
+ public static final String TAG_UL = "UL";
- public static final String ATTR_ID = "ID";
- public static final String ATTR_TYPE ="TYPE";
- public static final String ATTR_TEXT ="TEXT";
- public static final String ATTR_CLASS ="CLASS";
- public static final String ATTR_TITLE ="TITLE";
- public static final String ATTR_NAME ="NAME";
- public static final String ATTR_VALUE ="VALUE";
- public static final String ATTR_STYLE ="STYLE";
+ public static final String ATTR_ID = "ID";
+ public static final String ATTR_TYPE ="TYPE";
+ public static final String ATTR_TEXT ="TEXT";
+ public static final String ATTR_CLASS ="CLASS";
+ public static final String ATTR_TITLE ="TITLE";
+ public static final String ATTR_NAME ="NAME";
+ public static final String ATTR_VALUE ="VALUE";
+ public static final String ATTR_STYLE ="STYLE";
+ public static final String ATTR_SIZE ="SIZE";
+ public static final String ATTR_MULTIPLE = "MULTIPLE";
}
\ No newline at end of file
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/templates/vpe-templates-jsf.xml
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/templates/vpe-templates-jsf.xml 2008-01-04 01:55:08 UTC (rev 5503)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/templates/vpe-templates-jsf.xml 2008-01-04 11:01:05 UTC (rev 5504)
@@ -671,45 +671,9 @@
</vpe:tag>
<vpe:tag name="h:selectOneListbox" case-sensitive="yes">
- <vpe:if test="attrpresent('size')">
- <vpe:template children="yes" modify="yes">
- <select size="{@size}" style="{@style}"
- class="{@styleClass}" title="{tagstring()}" />
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- <vpe:drop container="yes">
- <vpe:container-child tag-name="selectItem" />
- <vpe:container-child tag-name="selectItems" />
- </vpe:drop>
- </vpe:dnd>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
- </vpe:template>
- </vpe:if>
- <vpe:template children="yes" modify="yes">
- <select size="3" style="{@style}" class="{@styleClass}"
- title="{tagstring()}" />
+ <vpe:template
+ class="org.jboss.tools.vpe.editor.template.JsfSelectOneListbox"
+ children="yes" modify="yes">
<vpe:dnd>
<vpe:drag start-enable="yes" />
<vpe:drop container="yes">
@@ -740,82 +704,45 @@
<vpe:formatAttribute type="style" />
</vpe:format>
</vpe:textFormating>
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="h:selectManyListbox" case-sensitive="yes">
- <vpe:if test="attrpresent('size')">
- <vpe:template children="yes" modify="yes">
- <select size="{@size}" style="{@style}"
- class="{@styleClass}" title="{tagstring()}" multiple="multiple" />
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- <vpe:drop container="yes">
- <vpe:container-child tag-name="selectItem" />
- <vpe:container-child tag-name="selectItems" />
- </vpe:drop>
- </vpe:dnd>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
- </vpe:template>
- </vpe:if>
- <vpe:template children="yes" modify="yes">
- <select size="3" style="{@style}" class="{@styleClass}"
- title="{tagstring()}" multiple="multiple"/>
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- <vpe:drop container="yes">
- <vpe:container-child tag-name="selectItem" />
- <vpe:container-child tag-name="selectItems" />
- </vpe:drop>
- </vpe:dnd>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
- </vpe:template>
- </vpe:tag>
-
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="h:selectManyListbox" case-sensitive="yes">
+ <vpe:template children="yes" modify="yes"
+ class="org.jboss.tools.vpe.editor.template.JsfSelectManyListbox">
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="yes">
+ <vpe:container-child tag-name="selectItem" />
+ <vpe:container-child tag-name="selectItems" />
+ </vpe:drop>
+ </vpe:dnd>
+ <vpe:textFormating>
+ <vpe:format type="UnderlineFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="BoldFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="ItalicFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="FontNameFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="FontSizeFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="BackgroundColorFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ <vpe:format type="ForegroundColorFormat">
+ <vpe:formatAttribute type="style" />
+ </vpe:format>
+ </vpe:textFormating>
+ </vpe:template>
+ </vpe:tag>
+
<vpe:tag name="h:selectOneMenu" case-sensitive="yes">
<vpe:template children="yes" modify="yes">
<select style="{@style}" class="{@styleClass}" title="{tagstring()}"/>
17 years
JBoss Tools SVN: r5503 - trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-01-03 20:55:08 -0500 (Thu, 03 Jan 2008)
New Revision: 5503
Modified:
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/HyperlinkPartitionerDefinition.java
Log:
http://jira.jboss.org/jira/browse/JBIDE-1544
Need add @catalogProperty@@schemaProperty@ back to persistence.xml templates file in seam-gen.
JUnit tests also added.
Modified: trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/HyperlinkPartitionerDefinition.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/HyperlinkPartitionerDefinition.java 2008-01-04 01:55:05 UTC (rev 5502)
+++ trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/HyperlinkPartitionerDefinition.java 2008-01-04 01:55:08 UTC (rev 5503)
@@ -234,7 +234,7 @@
}
public boolean equals(Object obj) {
- if(obj == null && !(obj instanceof ContentType)) {
+ if(obj == null || !(obj instanceof ContentType)) {
return false;
}
ContentType type = (ContentType)obj;
@@ -285,7 +285,7 @@
}
public boolean equals(Object obj) {
- if(obj == null && !(obj instanceof PartitionType)) {
+ if(obj == null || !(obj instanceof PartitionType)) {
return false;
}
PartitionType type = (PartitionType)obj;
@@ -392,7 +392,7 @@
}
public boolean equals(Object obj) {
- if(obj == null && !(obj instanceof Axis)) {
+ if(obj == null || !(obj instanceof Axis)) {
return false;
}
Axis axis = (Axis)obj;
17 years
JBoss Tools SVN: r5502 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-01-03 20:55:05 -0500 (Thu, 03 Jan 2008)
New Revision: 5502
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/ISeamFacetDataModelProperties.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDataModelProvider.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegate.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetPreInstallDelegate.java
Log:
http://jira.jboss.org/jira/browse/JBIDE-1544
Need add @catalogProperty@@schemaProperty@ back to persistence.xml templates file in seam-gen.
JUnit tests also added.
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/ISeamFacetDataModelProperties.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/ISeamFacetDataModelProperties.java 2008-01-04 01:54:58 UTC (rev 5501)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/ISeamFacetDataModelProperties.java 2008-01-04 01:55:05 UTC (rev 5502)
@@ -132,6 +132,14 @@
* Schema name
*/
String DB_SCHEMA_NAME = "schema.property"; //$NON-NLS-1$
+
+ /**
+ * If it is empty schema.property is empty
+ * If is not empty schema.property should be set to
+ * 
 <property name="hibernate.default_schema" value="${hibernate.default_schema}"/>
+ *
+ */
+ String DB_DEFAULT_SCHEMA_NAME = "hibernate.default_schema"; //$NON-NLS-1$
/**
* Catalog name
@@ -139,6 +147,13 @@
String DB_CATALOG_NAME = "catalog.property"; //$NON-NLS-1$
/**
+ * If it is empty catalog.property is empty
+ * If is not empty catalog.property should be set to
+ * 
 <property name="hibernate.default_catalog" value="${hibernate.default_catalog}"/>
+ */
+ String DB_DEFAULT_CATALOG_NAME = "hibernate.default_catalog"; //$NON-NLS-1$
+
+ /**
* DB tables already exists in database check box value
*/
String DB_ALREADY_EXISTS = "database.exists"; //$NON-NLS-1$
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDataModelProvider.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDataModelProvider.java 2008-01-04 01:54:58 UTC (rev 5501)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDataModelProvider.java 2008-01-04 01:55:05 UTC (rev 5502)
@@ -7,55 +7,44 @@
*
* Contributors:
* Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
+ ******************************************************************************/
package org.jboss.tools.seam.internal.core.project.facet;
import java.io.File;
import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
import java.util.Set;
import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.wst.common.componentcore.datamodel.FacetInstallDataModelProvider;
import org.jboss.tools.seam.core.SeamCorePlugin;
/**
* Data model provider for Seam facet wizard page
+ *
* @author eskimo
- *
+ *
*/
public class SeamFacetInstallDataModelProvider extends
FacetInstallDataModelProvider implements ISeamFacetDataModelProperties {
-
- @Override
- public IStatus validate(String name) {
- // TODO Auto-generated method stub
- return super.validate(name);
- }
- public static final Map<String,String[]> SEAM_LIBRARIES= new HashMap<String,String[]>();
-
- static {
- SEAM_LIBRARIES.put("1.2",new String[] { //$NON-NLS-1$
- });
- }
+ private static final String EMPTY_STRING = "";
+
/**
* Returns set of facet properties for facet wizard page
+ *
+ * @return set of property names
*/
- @Override
public Set getPropertyNames() {
Set<String> names = super.getPropertyNames();
-
+
// General group
names.add(ISeamFacetDataModelProperties.JBOSS_AS_HOME);
names.add(ISeamFacetDataModelProperties.JBOSS_SEAM_HOME);
names.add(ISeamFacetDataModelProperties.JBOSS_AS_DEPLOY_AS);
names.add(ISeamFacetDataModelProperties.JBOSS_AS_TARGET_SERVER);
names.add(ISeamFacetDataModelProperties.JBOSS_AS_TARGET_RUNTIME);
-
+
// Database group
names.add(ISeamFacetDataModelProperties.DB_TYPE);
names.add(ISeamFacetDataModelProperties.HIBERNATE_DIALECT);
@@ -65,8 +54,9 @@
names.add(ISeamFacetDataModelProperties.DB_USER_NAME);
names.add(ISeamFacetDataModelProperties.DB_USER_PASSWORD);
names.add(ISeamFacetDataModelProperties.DB_SCHEMA_NAME);
+ names.add(ISeamFacetDataModelProperties.DB_DEFAULT_SCHEMA_NAME);
names.add(ISeamFacetDataModelProperties.DB_CATALOG_NAME);
-
+ names.add(ISeamFacetDataModelProperties.DB_DEFAULT_CATALOG_NAME);
names.add(ISeamFacetDataModelProperties.DB_ALREADY_EXISTS);
names.add(ISeamFacetDataModelProperties.RECREATE_TABLES_AND_DATA_ON_DEPLOY);
@@ -84,31 +74,46 @@
names.add(ISeamFacetDataModelProperties.SEAM_TEST_PROJECT);
names.add(ISeamFacetDataModelProperties.SEAM_RUNTIME_NAME);
names.add(ISeamFacetDataModelProperties.HIBERNATE_HBM2DDL_AUTO);
-
+
return names;
}
-
+
/**
* Returns default value for a given property
+ *
+ * @param propertyName name of property which default value requested
+ * @return default value
*/
public Object getDefaultProperty(String propertyName) {
- if(JBOSS_AS_HOME.equals(propertyName)) {
+ if (JBOSS_AS_HOME.equals(propertyName)) {
return "Jboss_AS_HOME"; //$NON-NLS-1$
- } else if(JBOSS_AS_DEPLOY_AS.equals(propertyName)) {
+ } else if (JBOSS_AS_DEPLOY_AS.equals(propertyName)) {
return "Jboos_DEPLOY_AS"; //$NON-NLS-1$
} else if (propertyName.equals(FACET_ID)) {
- return ISeamCoreConstants.SEAM_CORE_FACET_ID;
- } else if(SEAM_TEST_PROJECT.equals(propertyName)) {
- return "";
- } else if(SEAM_EJB_PROJECT.equals(propertyName)) {
- return "";
- } else if(SEAM_EAR_PROJECT.equals(propertyName)) {
- return "";
+ return ISeamCoreConstants.SEAM_CORE_FACET_ID;
+ } else if (SEAM_TEST_PROJECT.equals(propertyName)) {
+ return EMPTY_STRING;
+ } else if (SEAM_EJB_PROJECT.equals(propertyName)) {
+ return EMPTY_STRING;
+ } else if (SEAM_EAR_PROJECT.equals(propertyName)) {
+ return EMPTY_STRING;
+ } else if (DB_DEFAULT_CATALOG_NAME.equals(propertyName)) {
+ return EMPTY_STRING;
+ } else if (DB_DEFAULT_SCHEMA_NAME.equals(propertyName)) {
+ return EMPTY_STRING;
}
return super.getDefaultProperty(propertyName);
}
-
+
+ /**
+ * Calculate path to templates folder
+ *
+ * @return path to templates
+ * @throws IOException if templates folder not found
+ */
public static File getTemplatesFolder() throws IOException {
- return new File(FileLocator.resolve(Platform.getBundle(SeamCorePlugin.PLUGIN_ID).getEntry("/templates")).getPath()); //$NON-NLS-1$
+ return new File(FileLocator.resolve(
+ Platform.getBundle(SeamCorePlugin.PLUGIN_ID).getEntry(
+ "/templates")).getPath()); //$NON-NLS-1$
}
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegate.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegate.java 2008-01-04 01:54:58 UTC (rev 5501)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegate.java 2008-01-04 01:55:05 UTC (rev 5502)
@@ -50,15 +50,37 @@
import org.osgi.service.prefs.BackingStoreException;
import org.osgi.service.prefs.Preferences;
+/**
+ * Install delegate for seam faset version 1.2
+ *
+ * @author eskimo
+ */
public class SeamFacetInstallDelegate extends SeamFacetAbstractInstallDelegate {
- public static String DEV_WAR_PROFILE = "dev-war"; //$NON-NLS-1$
- public static String DEV_EAR_PROFILE = "dev"; //$NON-NLS-1$
- public static String TEST_WAR_PROFILE = "test-war"; //$NON-NLS-1$
- public static String TEST_EAR_PROFILE = "test"; //$NON-NLS-1$
+ /**
+ *
+ **/
+ public static final String DEV_WAR_PROFILE = "dev-war"; //$NON-NLS-1$
+ /**
+ *
+ */
+ public static final String DEV_EAR_PROFILE = "dev"; //$NON-NLS-1$
- public static AntCopyUtils.FileSet JBOSS_WAR_LIB_FILESET_WAR_CONFIG = new AntCopyUtils.FileSet()
+ /**
+ *
+ */
+ public static final String TEST_WAR_PROFILE = "test-war"; //$NON-NLS-1$
+
+ /**
+ *
+ */
+ public static final String TEST_EAR_PROFILE = "test"; //$NON-NLS-1$
+
+ /**
+ *
+ */
+ public static final AntCopyUtils.FileSet JBOSS_WAR_LIB_FILESET_WAR_CONFIG = new AntCopyUtils.FileSet()
.include("ajax4jsf.*\\.jar") //$NON-NLS-1$
.include("richfaces.*\\.jar") //$NON-NLS-1$
.include("antlr.*\\.jar") //$NON-NLS-1$
@@ -83,7 +105,10 @@
.include("stringtemplate.*\\.jar") //$NON-NLS-1$
// el-ri needed for JBIDE-939
.include("el-ri.*\\.jar"); //$NON-NLS-1$
-
+
+ /**
+ *
+ */
public static AntCopyUtils.FileSet JBOSS_TEST_LIB_FILESET = new AntCopyUtils.FileSet()
.include("testng-.*-jdk15\\.jar") //$NON-NLS-1$
.include("myfaces-api-.*\\.jar") //$NON-NLS-1$
@@ -95,6 +120,9 @@
.exclude(".*/CVS") //$NON-NLS-1$
.exclude(".*/\\.svn"); //$NON-NLS-1$
+ /**
+ *
+ */
public static AntCopyUtils.FileSet JBOSS_WAR_LIB_FILESET_EAR_CONFIG = new AntCopyUtils.FileSet()
.include("ajax4jsf.*\\.jar") //$NON-NLS-1$
.include("richfaces.*\\.jar") //$NON-NLS-1$
@@ -110,7 +138,9 @@
.include("jsf-facelets\\.jar") //$NON-NLS-1$
.include("oscache.*\\.jar"); //$NON-NLS-1$
-
+ /**
+ *
+ */
public static AntCopyUtils.FileSet JBOSS_EAR_CONTENT = new AntCopyUtils.FileSet()
.include("antlr.*\\.jar") //$NON-NLS-1$
.include("commons-jci-core.*\\.jar") //$NON-NLS-1$
@@ -125,10 +155,16 @@
// el-ri needed for JBIDE-939
.include("el-ri.*\\.jar"); //$NON-NLS-1$
+ /**
+ *
+ */
public static AntCopyUtils.FileSet JBOSS_EAR_CONTENT_META_INF = new AntCopyUtils.FileSet()
.include("META-INF/application\\.xml") //$NON-NLS-1$
.include("META-INF/jboss-app\\.xml"); //$NON-NLS-1$
-
+
+ /**
+ *
+ */
public static AntCopyUtils.FileSet VIEW_FILESET = new AntCopyUtils.FileSet()
.include("home\\.xhtml") //$NON-NLS-1$
.include("error\\.xhtml") //$NON-NLS-1$
@@ -145,13 +181,19 @@
.exclude(".*/CVS") //$NON-NLS-1$
.exclude(".*/\\.svn"); //$NON-NLS-1$
+ /**
+ *
+ */
public static AntCopyUtils.FileSet CVS_SVN = new AntCopyUtils.FileSet()
.include(".*") //$NON-NLS-1$
.exclude(".*/CVS") //$NON-NLS-1$
.exclude("CVS") //$NON-NLS-1$
.exclude(".*\\.svn") //$NON-NLS-1$
.exclude(".*/\\.svn"); //$NON-NLS-1$
-
+
+ /**
+ *
+ */
public static AntCopyUtils.FileSet JBOOS_WAR_WEBINF_SET = new AntCopyUtils.FileSet()
.include("WEB-INF") //$NON-NLS-1$
.include("WEB-INF/web\\.xml") //$NON-NLS-1$
@@ -159,27 +201,48 @@
.include("WEB-INF/jboss-web\\.xml") //$NON-NLS-1$
.include("WEB-INF/faces-config\\.xml") //$NON-NLS-1$
.include("WEB-INF/componets\\.xml"); //$NON-NLS-1$
-
+
+ /**
+ *
+ */
public static AntCopyUtils.FileSet JBOOS_WAR_WEB_INF_CLASSES_SET = new AntCopyUtils.FileSet()
.include("import\\.sql") //$NON-NLS-1$
.include("security\\.drl") //$NON-NLS-1$
.include("seam\\.properties") //$NON-NLS-1$
.include("messages_en\\.properties"); //$NON-NLS-1$
-
+
+ /**
+ *
+ */
public static AntCopyUtils.FileSet JBOOS_EJB_WEB_INF_CLASSES_SET = new AntCopyUtils.FileSet()
.include("import\\.sql") //$NON-NLS-1$
.include("seam\\.properties")
.exclude(".*/WEB-INF"); //$NON-NLS-1$
-
+
+ /**
+ *
+ */
public static AntCopyUtils.FileSet JBOSS_EAR_META_INF_SET = new AntCopyUtils.FileSet()
.include("META-INF/jboss-app\\.xml"); //$NON-NLS-1$
-
+
+ /**
+ *
+ */
public static String DROOLS_LIB_SEAM_RELATED_PATH = "drools/lib"; //$NON-NLS-1$
-
+
+ /**
+ *
+ */
public static String SEAM_LIB_RELATED_PATH = "lib"; //$NON-NLS-1$
-
+
+ /**
+ *
+ */
public static String WEB_LIBRARIES_RELATED_PATH = "WEB-INF/lib"; //$NON-NLS-1$
-
+
+ /**
+ *
+ */
public void doExecute(final IProject project, IProjectFacetVersion fv,
Object config, IProgressMonitor monitor) throws CoreException {
final IDataModel model = (IDataModel)config;
@@ -191,51 +254,50 @@
IContainer webRootFolder = webRootVirtFolder.getUnderlyingFolder();
model.setProperty(ISeamFacetDataModelProperties.SEAM_PROJECT_NAME, project.getName());
- model.setProperty(ISeamFacetDataModelProperties.SEAM_TEST_PROJECT, project.getName()+"-test"); //$NON-NLS-1$
+ model.setProperty(ISeamFacetDataModelProperties.SEAM_TEST_PROJECT, project.getName() + "-test"); //$NON-NLS-1$
- Boolean dbExists = (Boolean)model.getProperty(ISeamFacetDataModelProperties.DB_ALREADY_EXISTS);
- Boolean dbRecreate = (Boolean)model.getProperty(ISeamFacetDataModelProperties.RECREATE_TABLES_AND_DATA_ON_DEPLOY);
- if(!dbExists && !dbRecreate) {
- model.setProperty(ISeamFacetDataModelProperties.HIBERNATE_HBM2DDL_AUTO,"update"); //$NON-NLS-1$
- } else if(dbExists && !dbRecreate) {
- model.setProperty(ISeamFacetDataModelProperties.HIBERNATE_HBM2DDL_AUTO,"validate"); //$NON-NLS-1$
- } else if(dbRecreate) {
- model.setProperty(ISeamFacetDataModelProperties.HIBERNATE_HBM2DDL_AUTO,"create-drop"); //$NON-NLS-1$
+ Boolean dbExists = (Boolean) model.getProperty(ISeamFacetDataModelProperties.DB_ALREADY_EXISTS);
+ Boolean dbRecreate = (Boolean) model.getProperty(ISeamFacetDataModelProperties.RECREATE_TABLES_AND_DATA_ON_DEPLOY);
+ if (!dbExists && !dbRecreate) {
+ model.setProperty(ISeamFacetDataModelProperties.HIBERNATE_HBM2DDL_AUTO, "update"); //$NON-NLS-1$
+ } else if (dbExists && !dbRecreate) {
+ model.setProperty(ISeamFacetDataModelProperties.HIBERNATE_HBM2DDL_AUTO, "validate"); //$NON-NLS-1$
+ } else if (dbRecreate) {
+ model.setProperty(ISeamFacetDataModelProperties.HIBERNATE_HBM2DDL_AUTO, "create-drop"); //$NON-NLS-1$
}
+ final String consoleName = isWarConfiguration(model) ? project.getName() : project.getName() + "-ejb";
- final String consoleName = isWarConfiguration(model)?project.getName():project.getName()+"-ejb";
-
final File webContentFolder = webRootFolder.getLocation().toFile();
- final File webInfFolder = new File(webContentFolder,"WEB-INF"); //$NON-NLS-1$
- final File webInfClasses = new File(webInfFolder,"classes"); //$NON-NLS-1$
+ final File webInfFolder = new File(webContentFolder, "WEB-INF"); //$NON-NLS-1$
+ final File webInfClasses = new File(webInfFolder, "classes"); //$NON-NLS-1$
final File webInfClassesMetaInf = new File(webInfClasses, "META-INF"); //$NON-NLS-1$
webInfClassesMetaInf.mkdirs();
- final File webLibFolder = new File(webContentFolder,WEB_LIBRARIES_RELATED_PATH);
- final File srcFolder = isWarConfiguration(model)?new File(srcRootFolder.getUnderlyingFolder().getLocation().toFile(),"model"):srcRootFolder.getUnderlyingFolder().getLocation().toFile(); //$NON-NLS-1$
+ final File webLibFolder = new File(webContentFolder, WEB_LIBRARIES_RELATED_PATH);
+ final File srcFolder = isWarConfiguration(model) ? new File(srcRootFolder.getUnderlyingFolder().getLocation().toFile(), "model") : srcRootFolder.getUnderlyingFolder().getLocation().toFile(); //$NON-NLS-1$
final File webMetaInf = new File(webContentFolder, "META-INF"); //$NON-NLS-1$
final SeamRuntime selectedRuntime = SeamRuntimeManager.getInstance().findRuntimeByName(model.getProperty(ISeamFacetDataModelProperties.SEAM_RUNTIME_NAME).toString());
final String seamHomePath = selectedRuntime.getHomeDir();
final File seamHomeFolder = new File(seamHomePath);
- final File seamLibFolder = new File(seamHomePath,SEAM_LIB_RELATED_PATH);
- final File seamGenResFolder = new File(seamHomePath,"seam-gen/resources"); //$NON-NLS-1$
- final File seamGenResMetainfFolder = new File(seamGenResFolder,"META-INF"); //$NON-NLS-1$
+ final File seamLibFolder = new File(seamHomePath, SEAM_LIB_RELATED_PATH);
+ final File seamGenResFolder = new File(seamHomePath, "seam-gen/resources"); //$NON-NLS-1$
+ final File seamGenResMetainfFolder = new File(seamGenResFolder, "META-INF"); //$NON-NLS-1$
- final File droolsLibFolder = new File(seamHomePath,DROOLS_LIB_SEAM_RELATED_PATH);
- final File seamGenHomeFolder = new File(seamHomePath,"seam-gen"); //$NON-NLS-1$
- final File seamGenViewSource = new File(seamGenHomeFolder,"view"); //$NON-NLS-1$
+ final File droolsLibFolder = new File(seamHomePath, DROOLS_LIB_SEAM_RELATED_PATH);
+ final File seamGenHomeFolder = new File(seamHomePath, "seam-gen"); //$NON-NLS-1$
+ final File seamGenViewSource = new File(seamGenHomeFolder, "view"); //$NON-NLS-1$
final File dataSourceDsFile = new File(seamGenResFolder, "datasource-ds.xml"); //$NON-NLS-1$
- final File componentsFile = new File(seamGenResFolder,"WEB-INF/components"+(isWarConfiguration(model)?"-war":"")+".xml"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ final File componentsFile = new File(seamGenResFolder, "WEB-INF/components" + (isWarConfiguration(model) ? "-war" : "") + ".xml"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
final File hibernateConsoleLaunchFile = new File(seamGenHomeFolder, "hibernatetools/hibernate-console.launch"); //$NON-NLS-1$
final File hibernateConsolePropsFile = new File(seamGenHomeFolder, "hibernatetools/hibernate-console.properties"); //$NON-NLS-1$
//final File hibernateConsolePref = new File(seamGenHomeFolder, "hibernatetools/.settings/org.hibernate.eclipse.console.prefs"); //$NON-NLS-1$
- final File persistenceFile = new File(seamGenResFolder,"META-INF/persistence-" + (isWarConfiguration(model)?DEV_WAR_PROFILE:DEV_EAR_PROFILE) + ".xml"); //$NON-NLS-1$ //$NON-NLS-2$
+ final File persistenceFile = new File(seamGenResFolder, "META-INF/persistence-" + (isWarConfiguration(model) ? DEV_WAR_PROFILE : DEV_EAR_PROFILE) + ".xml"); //$NON-NLS-1$ //$NON-NLS-2$
- final File applicationFile = new File(seamGenResFolder,"META-INF/application.xml"); //$NON-NLS-1$
+ final File applicationFile = new File(seamGenResFolder, "META-INF/application.xml"); //$NON-NLS-1$
final FilterSet jdbcFilterSet = SeamFacetFilterSetFactory.createJdbcFilterSet(model);
final FilterSet projectFilterSet = SeamFacetFilterSetFactory.createProjectFilterSet(model);
@@ -263,11 +325,11 @@
AntCopyUtils.copyFileToFile(
componentsFile,
- new File(webInfFolder,"components.xml"), //$NON-NLS-1$
+ new File(webInfFolder, "components.xml"), //$NON-NLS-1$
new FilterSetCollection(projectFilterSet), true);
AntCopyUtils.copyFilesAndFolders(
- seamGenResFolder,webContentFolder,new AntCopyUtils.FileSetFileFilter(webInfSet), viewFilterSetCollection, true);
+ seamGenResFolder, webContentFolder, new AntCopyUtils.FileSetFileFilter(webInfSet), viewFilterSetCollection, true);
final FilterSetCollection hibernateDialectFilterSet = new FilterSetCollection();
@@ -276,18 +338,18 @@
hibernateDialectFilterSet.addFilterSet(SeamFacetFilterSetFactory.createHibernateDialectFilterSet(model));
- createTestProject(model,project,selectedRuntime);
+ createTestProject(model, project, selectedRuntime);
// ********************************************************************************************
// Handle WAR/EAR configurations
// ********************************************************************************************
- if(isWarConfiguration(model)) {
+ if (isWarConfiguration(model)) {
AntCopyUtils.FileSet webInfClassesSet = new AntCopyUtils.FileSet(JBOOS_WAR_WEB_INF_CLASSES_SET).dir(seamGenResFolder);
AntCopyUtils.copyFilesAndFolders(
- seamGenResFolder,srcFolder,new AntCopyUtils.FileSetFileFilter(webInfClassesSet), viewFilterSetCollection, true);
+ seamGenResFolder, srcFolder, new AntCopyUtils.FileSetFileFilter(webInfClassesSet), viewFilterSetCollection, true);
- createComponentsProperties(srcFolder, isWarConfiguration(model)?"":project.getName()+"-ear", false); //$NON-NLS-1$ //$NON-NLS-2$
+ createComponentsProperties(srcFolder, isWarConfiguration(model) ? "" : project.getName() + "-ear", false); //$NON-NLS-1$ //$NON-NLS-2$
/*AntCopyUtils.copyFileToFolder(
hibernateConsolePref,
@@ -295,18 +357,18 @@
new FilterSetCollection(projectFilterSet), true);*/
// In case of WAR configuration
- AntCopyUtils.copyFiles(seamHomeFolder,webLibFolder,new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_WAR_LIB_FILESET_WAR_CONFIG).dir(seamHomeFolder)));
- AntCopyUtils.copyFiles(seamLibFolder,webLibFolder,new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_WAR_LIB_FILESET_WAR_CONFIG).dir(seamLibFolder)));
- AntCopyUtils.copyFiles(droolsLibFolder,webLibFolder,new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_WAR_LIB_FILESET_WAR_CONFIG).dir(droolsLibFolder)));
+ AntCopyUtils.copyFiles(seamHomeFolder, webLibFolder, new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_WAR_LIB_FILESET_WAR_CONFIG).dir(seamHomeFolder)));
+ AntCopyUtils.copyFiles(seamLibFolder, webLibFolder, new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_WAR_LIB_FILESET_WAR_CONFIG).dir(seamLibFolder)));
+ AntCopyUtils.copyFiles(droolsLibFolder, webLibFolder, new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_WAR_LIB_FILESET_WAR_CONFIG).dir(droolsLibFolder)));
// ********************************************************************************************
// Copy seam project indicator
// ********************************************************************************************
- AntCopyUtils.copyFileToFolder(new File(seamGenResFolder,"seam.properties"), srcFolder, true); //$NON-NLS-1$
+ AntCopyUtils.copyFileToFolder(new File(seamGenResFolder, "seam.properties"), srcFolder, true); //$NON-NLS-1$
final IContainer source = srcRootFolder.getUnderlyingFolder();
- IPath actionSrcPath = new Path(source.getFullPath().removeFirstSegments(1)+"/action"); //$NON-NLS-1$
- IPath modelSrcPath = new Path(source.getFullPath().removeFirstSegments(1)+"/model"); //$NON-NLS-1$
+ IPath actionSrcPath = new Path(source.getFullPath().removeFirstSegments(1) + "/action"); //$NON-NLS-1$
+ IPath modelSrcPath = new Path(source.getFullPath().removeFirstSegments(1) + "/model"); //$NON-NLS-1$
srcRootFolder.delete(IVirtualFolder.FORCE, monitor);
WtpUtils.createSourceFolder(project, actionSrcPath, source.getFullPath().removeFirstSegments(1), webRootFolder.getFullPath().removeFirstSegments(1).append("WEB-INF/dev")); //$NON-NLS-1$
@@ -316,24 +378,24 @@
srcRootFolder.createLink(modelSrcPath, 0, null);
AntCopyUtils.copyFileToFile(
- new File(seamGenHomeFolder,"src/Authenticator.java"), //$NON-NLS-1$
- new File(project.getLocation().toFile(),source.getFullPath().removeFirstSegments(1)+"/action/" + model.getProperty(ISeamFacetDataModelProperties.SESION_BEAN_PACKAGE_NAME).toString().replace('.', '/')+"/"+"Authenticator.java"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ new File(seamGenHomeFolder, "src/Authenticator.java"), //$NON-NLS-1$
+ new File(project.getLocation().toFile(), source.getFullPath().removeFirstSegments(1) + "/action/" + model.getProperty(ISeamFacetDataModelProperties.SESION_BEAN_PACKAGE_NAME).toString().replace('.', '/') + "/" + "Authenticator.java"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
new FilterSetCollection(filtersFilterSet), true);
AntCopyUtils.copyFileToFile(
persistenceFile,
- new File(srcFolder,"META-INF/persistence.xml"), //$NON-NLS-1$
+ new File(srcFolder, "META-INF/persistence.xml"), //$NON-NLS-1$
viewFilterSetCollection, true);
- File resources = new File(project.getLocation().toFile(),"resources");
+ File resources = new File(project.getLocation().toFile(), "resources");
AntCopyUtils.copyFileToFile(
dataSourceDsFile,
- new File(resources,project.getName()+"-ds.xml"), //$NON-NLS-1$
+ new File(resources, project.getName() + "-ds.xml"), //$NON-NLS-1$
viewFilterSetCollection, true);
AntCopyUtils.copyFileToFile(
hibernateConsoleLaunchFile,
- new File(project.getLocation().toFile(),project.getName()+".launch"), //$NON-NLS-1$
+ new File(project.getLocation().toFile(), project.getName() + ".launch"), //$NON-NLS-1$
viewFilterSetCollection, true);
AntCopyUtils.copyFileToFolder(
@@ -344,17 +406,17 @@
WtpUtils.setClasspathEntryAsExported(project, new Path("org.eclipse.jst.j2ee.internal.web.container"), monitor); //$NON-NLS-1$
} else {
- model.setProperty(ISeamFacetDataModelProperties.SEAM_EJB_PROJECT, project.getName()+"-ejb"); //$NON-NLS-1$
- model.setProperty(ISeamFacetDataModelProperties.SEAM_EAR_PROJECT, project.getName()+"-ear"); //$NON-NLS-1$
+ model.setProperty(ISeamFacetDataModelProperties.SEAM_EJB_PROJECT, project.getName() + "-ejb"); //$NON-NLS-1$
+ model.setProperty(ISeamFacetDataModelProperties.SEAM_EAR_PROJECT, project.getName() + "-ear"); //$NON-NLS-1$
// In case of EAR configuration
- AntCopyUtils.copyFiles(seamHomeFolder,webLibFolder,new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_WAR_LIB_FILESET_EAR_CONFIG).dir(seamHomeFolder)));
- AntCopyUtils.copyFiles(seamLibFolder,webLibFolder,new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_WAR_LIB_FILESET_EAR_CONFIG).dir(seamLibFolder)));
- AntCopyUtils.copyFiles(droolsLibFolder,webLibFolder,new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_WAR_LIB_FILESET_EAR_CONFIG).dir(droolsLibFolder)));
- AntCopyUtils.copyFileToFolder(new File(seamGenResFolder,"messages_en.properties"),srcFolder, true); //$NON-NLS-1$
+ AntCopyUtils.copyFiles(seamHomeFolder, webLibFolder, new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_WAR_LIB_FILESET_EAR_CONFIG).dir(seamHomeFolder)));
+ AntCopyUtils.copyFiles(seamLibFolder, webLibFolder, new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_WAR_LIB_FILESET_EAR_CONFIG).dir(seamLibFolder)));
+ AntCopyUtils.copyFiles(droolsLibFolder, webLibFolder, new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_WAR_LIB_FILESET_EAR_CONFIG).dir(droolsLibFolder)));
+ AntCopyUtils.copyFileToFolder(new File(seamGenResFolder, "messages_en.properties"), srcFolder, true); //$NON-NLS-1$
- File ear = new File(project.getLocation().removeLastSegments(1).toFile(),model.getProperty(ISeamFacetDataModelProperties.SEAM_PROJECT_NAME)+"-ear"); //$NON-NLS-1$
- File ejb = new File(project.getLocation().removeLastSegments(1).toFile(),model.getProperty(ISeamFacetDataModelProperties.SEAM_PROJECT_NAME)+"-ejb"); //$NON-NLS-1$
+ File ear = new File(project.getLocation().removeLastSegments(1).toFile(), model.getProperty(ISeamFacetDataModelProperties.SEAM_PROJECT_NAME) + "-ear"); //$NON-NLS-1$
+ File ejb = new File(project.getLocation().removeLastSegments(1).toFile(), model.getProperty(ISeamFacetDataModelProperties.SEAM_PROJECT_NAME) + "-ejb"); //$NON-NLS-1$
ear.mkdir();
ejb.mkdir();
@@ -362,16 +424,16 @@
FilterSet filterSet = new FilterSet();
filterSet.addFilter("projectName", project.getName()); //$NON-NLS-1$
filterSet.addFilter("runtimeName", WtpUtils.getServerRuntimeName(project)); //$NON-NLS-1$
- if(model.getProperty(ISeamFacetDataModelProperties.JDBC_DRIVER_JAR_PATH)!=null) {
- File driver = new File(((String[])model.getProperty(ISeamFacetDataModelProperties.JDBC_DRIVER_JAR_PATH))[0]);
- filterSet.addFilter("driverJar"," " + driver.getName() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ if (model.getProperty(ISeamFacetDataModelProperties.JDBC_DRIVER_JAR_PATH) != null) {
+ File driver = new File(((String[]) model.getProperty(ISeamFacetDataModelProperties.JDBC_DRIVER_JAR_PATH))[0]);
+ filterSet.addFilter("driverJar", " " + driver.getName() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
} else {
- filterSet.addFilter("driverJar",""); //$NON-NLS-1$ //$NON-NLS-2$
+ filterSet.addFilter("driverJar", ""); //$NON-NLS-1$ //$NON-NLS-2$
}
AntCopyUtils.FileSet excludeCvsSvn = new AntCopyUtils.FileSet(CVS_SVN).dir(seamGenResFolder);
AntCopyUtils.copyFilesAndFolders(
- new File(SeamFacetInstallDataModelProvider.getTemplatesFolder(),"ejb"), //$NON-NLS-1$
+ new File(SeamFacetInstallDataModelProvider.getTemplatesFolder(), "ejb"), //$NON-NLS-1$
ejb, new AntCopyUtils.FileSetFileFilter(excludeCvsSvn),
new FilterSetCollection(filterSet), true);
@@ -379,31 +441,31 @@
// Copy sources to ejb project in case of EAR configuration
// *******************************************************************************************
AntCopyUtils.copyFileToFile(
- new File(seamGenHomeFolder,"src/Authenticator.java"), //$NON-NLS-1$
- new File(ejb,"ejbModule/" + model.getProperty(ISeamFacetDataModelProperties.SESION_BEAN_PACKAGE_NAME).toString().replace('.', '/')+"/"+"Authenticator.java"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ new File(seamGenHomeFolder, "src/Authenticator.java"), //$NON-NLS-1$
+ new File(ejb, "ejbModule/" + model.getProperty(ISeamFacetDataModelProperties.SESION_BEAN_PACKAGE_NAME).toString().replace('.', '/') + "/" + "Authenticator.java"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
new FilterSetCollection(filtersFilterSet), true);
AntCopyUtils.copyFileToFile(
persistenceFile,
- new File(ejb,"ejbModule/META-INF/persistence.xml"), //$NON-NLS-1$
+ new File(ejb, "ejbModule/META-INF/persistence.xml"), //$NON-NLS-1$
viewFilterSetCollection, true);
- createComponentsProperties(new File(ejb,"ejbModule"), isWarConfiguration(model)?"":project.getName()+"-ear", false); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ createComponentsProperties(new File(ejb, "ejbModule"), isWarConfiguration(model) ? "" : project.getName() + "-ear", false); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
AntCopyUtils.FileSet ejbSrcResourcesSet = new AntCopyUtils.FileSet(JBOOS_EJB_WEB_INF_CLASSES_SET).dir(seamGenResFolder);
AntCopyUtils.copyFilesAndFolders(
- seamGenResFolder,new File(ejb,"ejbModule"),new AntCopyUtils.FileSetFileFilter(ejbSrcResourcesSet), viewFilterSetCollection, true); //$NON-NLS-1$
+ seamGenResFolder, new File(ejb, "ejbModule"), new AntCopyUtils.FileSetFileFilter(ejbSrcResourcesSet), viewFilterSetCollection, true); //$NON-NLS-1$
// ********************************************************************************************
// Copy seam project indicator
// ********************************************************************************************
- AntCopyUtils.copyFileToFolder(new File(seamGenResFolder,"seam.properties"), new File(ejb,"ejbModule/"), true); //$NON-NLS-1$ //$NON-NLS-2$
+ AntCopyUtils.copyFileToFolder(new File(seamGenResFolder, "seam.properties"), new File(ejb, "ejbModule/"), true); //$NON-NLS-1$ //$NON-NLS-2$
AntCopyUtils.copyFileToFolder(
- new File(seamGenResFolder,"META-INF/ejb-jar.xml"), //$NON-NLS-1$
- new File(ejb,"ejbModule/META-INF/"), //$NON-NLS-1$
+ new File(seamGenResFolder, "META-INF/ejb-jar.xml"), //$NON-NLS-1$
+ new File(ejb, "ejbModule/META-INF/"), //$NON-NLS-1$
viewFilterSetCollection, true);
/*AntCopyUtils.copyFileToFolder(
@@ -412,11 +474,11 @@
new FilterSetCollection(projectFilterSet), true);*/
FilterSet ejbFilterSet = new FilterSet();
- ejbFilterSet.addFilter("projectName",ejb.getName()); //$NON-NLS-1$
+ ejbFilterSet.addFilter("projectName", ejb.getName()); //$NON-NLS-1$
AntCopyUtils.copyFileToFile(
hibernateConsoleLaunchFile,
- new File(ejb,ejb.getName()+".launch"), //$NON-NLS-1$
+ new File(ejb, ejb.getName() + ".launch"), //$NON-NLS-1$
new FilterSetCollection(ejbFilterSet), true);
AntCopyUtils.copyFileToFolder(
@@ -424,34 +486,34 @@
ejb,
hibernateDialectFilterSet, true);
- File earContentsFolder = new File(ear,"EarContent"); //$NON-NLS-1$
+ File earContentsFolder = new File(ear, "EarContent"); //$NON-NLS-1$
FilterSet earFilterSet = new FilterSet();
- earFilterSet.addFilter("projectName",ear.getName()+".ear"); //$NON-NLS-1$ //$NON-NLS-2$
+ earFilterSet.addFilter("projectName", ear.getName() + ".ear"); //$NON-NLS-1$ //$NON-NLS-2$
AntCopyUtils.copyFileToFolder(
- new File(seamGenResFolder,"META-INF/jboss-app.xml"), //$NON-NLS-1$
- new File(earContentsFolder,"META-INF"), //$NON-NLS-1$
- new FilterSetCollection(earFilterSet),true);
+ new File(seamGenResFolder, "META-INF/jboss-app.xml"), //$NON-NLS-1$
+ new File(earContentsFolder, "META-INF"), //$NON-NLS-1$
+ new FilterSetCollection(earFilterSet), true);
// Copy configuration files from template
AntCopyUtils.copyFilesAndFolders(
- new File(SeamFacetInstallDataModelProvider.getTemplatesFolder(),"ear"), //$NON-NLS-1$
+ new File(SeamFacetInstallDataModelProvider.getTemplatesFolder(), "ear"), //$NON-NLS-1$
ear, new AntCopyUtils.FileSetFileFilter(excludeCvsSvn),
new FilterSetCollection(filterSet), true);
// Fill ear contents
- AntCopyUtils.copyFiles(seamHomeFolder,earContentsFolder,new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_EAR_CONTENT).dir(seamHomeFolder)));
- AntCopyUtils.copyFiles(seamLibFolder,earContentsFolder,new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_EAR_CONTENT).dir(seamLibFolder)));
- AntCopyUtils.copyFiles(droolsLibFolder,earContentsFolder,new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_EAR_CONTENT).dir(droolsLibFolder)));
- AntCopyUtils.copyFiles(seamLibFolder,earContentsFolder,new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_EAR_CONTENT).dir(seamLibFolder)));
- AntCopyUtils.copyFiles(seamGenResFolder,earContentsFolder,new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_EAR_CONTENT).dir(seamGenResFolder)));
+ AntCopyUtils.copyFiles(seamHomeFolder, earContentsFolder, new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_EAR_CONTENT).dir(seamHomeFolder)));
+ AntCopyUtils.copyFiles(seamLibFolder, earContentsFolder, new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_EAR_CONTENT).dir(seamLibFolder)));
+ AntCopyUtils.copyFiles(droolsLibFolder, earContentsFolder, new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_EAR_CONTENT).dir(droolsLibFolder)));
+ AntCopyUtils.copyFiles(seamLibFolder, earContentsFolder, new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_EAR_CONTENT).dir(seamLibFolder)));
+ AntCopyUtils.copyFiles(seamGenResFolder, earContentsFolder, new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_EAR_CONTENT).dir(seamGenResFolder)));
- File resources = new File(ear,"resources");
+ File resources = new File(ear, "resources");
AntCopyUtils.copyFileToFile(
dataSourceDsFile,
- new File(resources,project.getName()+"-ds.xml"), //$NON-NLS-1$ //$NON-NLS-2$
+ new File(resources, project.getName() + "-ds.xml"), //$NON-NLS-1$ //$NON-NLS-2$
viewFilterSetCollection, true);
try {
@@ -461,22 +523,21 @@
* @see java.io.FilenameFilter#accept(java.io.File, java.lang.String)
*/
public boolean accept(File dir, String name) {
- if(name.lastIndexOf(".jar")>0) return true; //$NON-NLS-1$
- return false;
+ return name.lastIndexOf(".jar") > 0; //$NON-NLS-1$
}
});
String earJarsStr = ""; //$NON-NLS-1$
for (File file : earJars) {
- earJarsStr +=" " + file.getName() +" \n"; //$NON-NLS-1$ //$NON-NLS-2$
+ earJarsStr += " " + file.getName() + " \n"; //$NON-NLS-1$ //$NON-NLS-2$
}
FilterSetCollection manifestFilterCol = new FilterSetCollection(projectFilterSet);
FilterSet manifestFilter = new FilterSet();
- manifestFilter.addFilter("earLibs",earJarsStr); //$NON-NLS-1$
+ manifestFilter.addFilter("earLibs", earJarsStr); //$NON-NLS-1$
manifestFilterCol.addFilterSet(manifestFilter);
- AntCopyUtils.copyFileToFolder(new File(SeamFacetInstallDataModelProvider.getTemplatesFolder(),"war/META-INF/MANIFEST.MF"), webMetaInf, manifestFilterCol, true); //$NON-NLS-1$
- File ejbMetaInf = new File(ejb,"ejbModule/META-INF"); //$NON-NLS-1$
- AntCopyUtils.copyFileToFolder(new File(SeamFacetInstallDataModelProvider.getTemplatesFolder(),"ejb/ejbModule/META-INF/MANIFEST.MF"), ejbMetaInf, manifestFilterCol, true); //$NON-NLS-1$
+ AntCopyUtils.copyFileToFolder(new File(SeamFacetInstallDataModelProvider.getTemplatesFolder(), "war/META-INF/MANIFEST.MF"), webMetaInf, manifestFilterCol, true); //$NON-NLS-1$
+ File ejbMetaInf = new File(ejb, "ejbModule/META-INF"); //$NON-NLS-1$
+ AntCopyUtils.copyFileToFolder(new File(SeamFacetInstallDataModelProvider.getTemplatesFolder(), "ejb/ejbModule/META-INF/MANIFEST.MF"), ejbMetaInf, manifestFilterCol, true); //$NON-NLS-1$
} catch (IOException e) {
SeamCorePlugin.getPluginLog().logError(e);
}
@@ -500,28 +561,32 @@
IWorkspaceRoot wsRoot = ResourcesPlugin.getWorkspace().getRoot();
- if(!isWarConfiguration(model)) {
+ if (!isWarConfiguration(model)) {
- IProject ejbProjectToBeImported = wsRoot.getProject(project.getName()+"-ejb");
- ResourcesUtils.importExistingProject(ejbProjectToBeImported, wsPath+"/"+project.getName()+"-ejb", project.getName()+"-ejb");
+ IProject ejbProjectToBeImported = wsRoot.getProject(project.getName() + "-ejb");
+ ResourcesUtils.importExistingProject(ejbProjectToBeImported, wsPath + "/" + project.getName() + "-ejb", project.getName() + "-ejb");
toggleHibernateOnProject(ejbProjectToBeImported, consoleName);
IProjectFacet sf = ProjectFacetsManager.getProjectFacet("jst.ejb");
IProjectFacetVersion pfv = ProjectFacetsManager.create(ejbProjectToBeImported).getInstalledVersion(sf);
ClasspathHelper.addClasspathEntries(ejbProjectToBeImported, pfv);
- IProject earProjectToBeImported = wsRoot.getProject(project.getName()+"-ear");
- ResourcesUtils.importExistingProject(earProjectToBeImported, wsPath+"/"+project.getName()+"-ear", project.getName()+"-ear");
+ IProject earProjectToBeImported = wsRoot.getProject(project.getName() + "-ear");
+ ResourcesUtils.importExistingProject(earProjectToBeImported, wsPath + "/" + project.getName() + "-ear", project.getName() + "-ear");
}
- IProject testProjectToBeImported = wsRoot.getProject(project.getName()+"-test");
- ResourcesUtils.importExistingProject(testProjectToBeImported, wsPath+"/"+project.getName()+"-test", project.getName()+"-test");
+ IProject testProjectToBeImported = wsRoot.getProject(project.getName() + "-test");
+ ResourcesUtils.importExistingProject(testProjectToBeImported, wsPath + "/" + project.getName() + "-test", project.getName() + "-test");
toggleHibernateOnProject(testProjectToBeImported, consoleName);
}
-
+ /**
+ *
+ * @param model
+ * @return
+ */
public static boolean isWarConfiguration(IDataModel model) {
return "war".equals(model.getProperty(ISeamFacetDataModelProperties.JBOSS_AS_DEPLOY_AS)); //$NON-NLS-1$
}
@@ -540,7 +605,7 @@
prefs.put(SEAM_RUNTIME_NAME, model.getProperty(SEAM_RUNTIME_NAME).toString());
- prefs.put(SEAM_CONNECTION_PROFILE,model.getProperty(SEAM_CONNECTION_PROFILE).toString());
+ prefs.put(SEAM_CONNECTION_PROFILE, model.getProperty(SEAM_CONNECTION_PROFILE).toString());
prefs.put(SESION_BEAN_PACKAGE_NAME, model.getProperty(SESION_BEAN_PACKAGE_NAME).toString());
@@ -549,17 +614,17 @@
prefs.put(TEST_CASES_PACKAGE_NAME, model.getProperty(TEST_CASES_PACKAGE_NAME).toString());
prefs.put(SEAM_TEST_PROJECT,
- model.getProperty(SEAM_TEST_PROJECT)==null?
- "":model.getProperty(SEAM_TEST_PROJECT).toString()); //$NON-NLS-1$
+ model.getProperty(SEAM_TEST_PROJECT) == null
+ ? "" : model.getProperty(SEAM_TEST_PROJECT).toString()); //$NON-NLS-1$
- if(DEPLOY_AS_EAR.equals(model.getProperty(JBOSS_AS_DEPLOY_AS))) {
+ if (DEPLOY_AS_EAR.equals(model.getProperty(JBOSS_AS_DEPLOY_AS))) {
prefs.put(SEAM_EJB_PROJECT,
- model.getProperty(SEAM_EJB_PROJECT)==null?
- "":model.getProperty(SEAM_EJB_PROJECT).toString()); //$NON-NLS-1$
+ model.getProperty(SEAM_EJB_PROJECT) == null
+ ? "" : model.getProperty(SEAM_EJB_PROJECT).toString()); //$NON-NLS-1$
prefs.put(SEAM_EAR_PROJECT,
- model.getProperty(SEAM_EAR_PROJECT)==null?
- "":model.getProperty(SEAM_EAR_PROJECT).toString()); //$NON-NLS-1$
+ model.getProperty(SEAM_EAR_PROJECT) == null
+ ? "" : model.getProperty(SEAM_EAR_PROJECT).toString()); //$NON-NLS-1$
}
try {
@@ -571,29 +636,29 @@
private void createTestProject(IDataModel model, IProject seamWebProject, SeamRuntime seamRuntime) {
String projectName = model.getProperty(ISeamFacetDataModelProperties.SEAM_PROJECT_NAME).toString();
- File testProjectDir = new File(seamWebProject.getLocation().removeLastSegments(1).toFile(),projectName+"-test"); //$NON-NLS-1$
+ File testProjectDir = new File(seamWebProject.getLocation().removeLastSegments(1).toFile(), projectName + "-test"); //$NON-NLS-1$
testProjectDir.mkdir();
IVirtualComponent component = ComponentCore.createComponent(seamWebProject);
IVirtualFolder webRootVirtFolder = component.getRootFolder().getFolder(new Path("/")); //$NON-NLS-1$
- File testLibDir = new File(testProjectDir,"lib"); //$NON-NLS-1$
- File embededEjbDir = new File(testProjectDir,"embedded-ejb"); //$NON-NLS-1$
- File testSrcDir = new File(testProjectDir,"test-src"); //$NON-NLS-1$
+ File testLibDir = new File(testProjectDir, "lib"); //$NON-NLS-1$
+ File embededEjbDir = new File(testProjectDir, "embedded-ejb"); //$NON-NLS-1$
+ File testSrcDir = new File(testProjectDir, "test-src"); //$NON-NLS-1$
String seamGenResFolder = seamRuntime.getResourceTemplatesDir();
- File persistenceFile = new File(seamGenResFolder ,"META-INF/persistence-" + (isWarConfiguration(model)?TEST_WAR_PROFILE:TEST_EAR_PROFILE) + ".xml"); //$NON-NLS-1$ //$NON-NLS-2$
- File jbossBeansFile = new File(seamGenResFolder ,"META-INF/jboss-beans.xml"); //$NON-NLS-1$
+ File persistenceFile = new File(seamGenResFolder , "META-INF/persistence-" + (isWarConfiguration(model) ? TEST_WAR_PROFILE:TEST_EAR_PROFILE) + ".xml"); //$NON-NLS-1$ //$NON-NLS-2$
+ File jbossBeansFile = new File(seamGenResFolder , "META-INF/jboss-beans.xml"); //$NON-NLS-1$
FilterSet filterSet = new FilterSet();
filterSet.addFilter("projectName", projectName); //$NON-NLS-1$
filterSet.addFilter("runtimeName", WtpUtils.getServerRuntimeName(seamWebProject)); //$NON-NLS-1$
- filterSet.addFilter("webRootFolder",webRootVirtFolder.getUnderlyingFolder().getFullPath().removeFirstSegments(1).toString()); //$NON-NLS-1$
+ filterSet.addFilter("webRootFolder", webRootVirtFolder.getUnderlyingFolder().getFullPath().removeFirstSegments(1).toString()); //$NON-NLS-1$
final SeamRuntime selectedRuntime = SeamRuntimeManager.getInstance().findRuntimeByName(model.getProperty(ISeamFacetDataModelProperties.SEAM_RUNTIME_NAME).toString());
final String seamHomePath = selectedRuntime.getHomeDir();
AntCopyUtils.FileSet includeLibs
= new AntCopyUtils.FileSet(JBOSS_TEST_LIB_FILESET)
- .dir(new File(seamRuntime.getHomeDir(),"lib")); //$NON-NLS-1$
+ .dir(new File(seamRuntime.getHomeDir(), "lib")); //$NON-NLS-1$
File[] libs = includeLibs.getDir().listFiles(new AntCopyUtils.FileSetFileFilter(includeLibs));
StringBuffer testLibraries = new StringBuffer();
@@ -604,15 +669,15 @@
StringBuffer requiredProjects = new StringBuffer();
requiredProjects.append(
"\t<classpathentry combineaccessrules=\"false\" kind=\"src\" path=\"/" + seamWebProject.getName() + "\"/>"); //$NON-NLS-1$ //$NON-NLS-2$
- if(!isWarConfiguration(model)) {
+ if (!isWarConfiguration(model)) {
requiredProjects.append(
"\n\t<classpathentry combineaccessrules=\"false\" kind=\"src\" path=\"/" + seamWebProject.getName() + "-ejb\"/>"); //$NON-NLS-1$ //$NON-NLS-2$
}
- filterSet.addFilter("testLibraries",testLibraries.toString()); //$NON-NLS-1$
- filterSet.addFilter("requiredProjects",requiredProjects.toString()); //$NON-NLS-1$
+ filterSet.addFilter("testLibraries", testLibraries.toString()); //$NON-NLS-1$
+ filterSet.addFilter("requiredProjects", requiredProjects.toString()); //$NON-NLS-1$
File testTemplateDir = null;
try {
- testTemplateDir = new File(SeamFacetInstallDataModelProvider.getTemplatesFolder(),"test"); //$NON-NLS-1$
+ testTemplateDir = new File(SeamFacetInstallDataModelProvider.getTemplatesFolder(), "test"); //$NON-NLS-1$
} catch (IOException e) {
SeamCorePlugin.getPluginLog().logError(e);
return;
@@ -626,14 +691,14 @@
new AntCopyUtils.FileSetFileFilter(excludeCvsSvn),
new FilterSetCollection(filterSet), true);
- excludeCvsSvn.dir(new File(seamRuntime.getHomeDir(),"embedded-ejb/conf")); //$NON-NLS-1$
+ excludeCvsSvn.dir(new File(seamRuntime.getHomeDir(), "embedded-ejb/conf")); //$NON-NLS-1$
AntCopyUtils.copyFiles(
- new File(seamRuntime.getHomeDir(),"embedded-ejb/conf"), //$NON-NLS-1$
+ new File(seamRuntime.getHomeDir(), "embedded-ejb/conf"), //$NON-NLS-1$
embededEjbDir,
new AntCopyUtils.FileSetFileFilter(excludeCvsSvn));
AntCopyUtils.copyFiles(
- new File(seamRuntime.getHomeDir(),"lib"), //$NON-NLS-1$
+ new File(seamRuntime.getHomeDir(), "lib"), //$NON-NLS-1$
testLibDir,
new AntCopyUtils.FileSetFileFilter(includeLibs));
@@ -641,14 +706,17 @@
}
/**
+ *
* @param seamGenResFolder
+ * @param projectName
+ * @param embedded
*/
private void createComponentsProperties(final File seamGenResFolder, String projectName, Boolean embedded) {
Properties components = new Properties();
- String prefix = "".equals(projectName)?"":projectName+"/"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ String prefix = "".equals(projectName) ? "" : projectName + "/"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
components.put("embeddedEjb", embedded.toString()); //$NON-NLS-1$
- components.put("jndiPattern", prefix+"#{ejbName}/local"); //$NON-NLS-1$ //$NON-NLS-2$
- File componentsProps = new File(seamGenResFolder,"components.properties"); //$NON-NLS-1$
+ components.put("jndiPattern", prefix + "#{ejbName}/local"); //$NON-NLS-1$ //$NON-NLS-2$
+ File componentsProps = new File(seamGenResFolder, "components.properties"); //$NON-NLS-1$
try {
componentsProps.createNewFile();
components.store(new FileOutputStream(componentsProps), ""); //$NON-NLS-1$
@@ -657,14 +725,20 @@
}
}
+ /**
+ *
+ * @param project
+ * @param defaultConsoleName
+ * @return
+ */
public static boolean toggleHibernateOnProject(IProject project, String defaultConsoleName) {
IScopeContext scope = new ProjectScope(project);
Preferences node = scope.getNode("org.hibernate.eclipse.console");
- if(node!=null) {
- node.putBoolean("hibernate3.enabled", true );
- node.put("default.configuration", defaultConsoleName );
+ if (node != null) {
+ node.putBoolean("hibernate3.enabled", true);
+ node.put("default.configuration", defaultConsoleName);
try {
node.flush();
} catch (BackingStoreException e) {
@@ -676,9 +750,9 @@
}
try {
- addProjectNature(project, "org.hibernate.eclipse.console.hibernateNature", new NullProgressMonitor() );
+ addProjectNature(project, "org.hibernate.eclipse.console.hibernateNature", new NullProgressMonitor());
return true;
- } catch(CoreException ce) {
+ } catch (CoreException ce) {
SeamCorePlugin.getDefault().logError("Could not activate Hibernate nature on project " + project.getName(), ce);
return false;
}
@@ -687,20 +761,24 @@
/**
* Add the given project nature to the given project (if it isn't already added).
+ *
+ * @param project
+ * @param nature
+ * @param monitor
* @return true if nature where added, false if not
- * @throws OperationCanceledException if job were cancelled or CoreException if something went wrong.
+ * @throws OperationCanceledException if job were canceled or CoreException if something went wrong.
*/
public static boolean addProjectNature(IProject project, String nature, IProgressMonitor monitor) throws CoreException {
- if (monitor != null && monitor.isCanceled() ) {
+ if (monitor != null && monitor.isCanceled()) {
throw new OperationCanceledException();
}
- if (!project.hasNature(nature) ) {
+ if (!project.hasNature(nature)) {
IProjectDescription description = project.getDescription();
- String[] prevNatures= description.getNatureIds();
- String[] newNatures= new String[prevNatures.length + 1];
+ String[] prevNatures = description.getNatureIds();
+ String[] newNatures = new String[prevNatures.length + 1];
System.arraycopy(prevNatures, 0, newNatures, 0, prevNatures.length);
- newNatures[prevNatures.length]= nature;
+ newNatures[prevNatures.length] = nature;
description.setNatureIds(newNatures);
project.setDescription(description, monitor);
return true;
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetPreInstallDelegate.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetPreInstallDelegate.java 2008-01-04 01:54:58 UTC (rev 5501)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetPreInstallDelegate.java 2008-01-04 01:55:05 UTC (rev 5502)
@@ -11,6 +11,7 @@
package org.jboss.tools.seam.internal.core.project.facet;
+import java.text.Format;
import java.util.Properties;
import org.eclipse.core.resources.IProject;
@@ -19,40 +20,89 @@
import org.eclipse.datatools.connectivity.IConnectionProfile;
import org.eclipse.datatools.connectivity.ProfileManager;
import org.eclipse.datatools.connectivity.drivers.DriverManager;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.common.project.facet.core.IDelegate;
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
-
+/**
+ * TBD
+ *
+ * @author eskimo
+ */
public class SeamFacetPreInstallDelegate implements IDelegate {
+
+
+ /**
+ * Indentation for hibernate property declaration
+ */
+ public static final String PROP_INDENT = "\n ";
+ /**
+ * Property declaration in persistence.xml
+ */
+ public static final String PROP_DECL = "<property name=\"{0}\" value=\"{1}\"/>";
+
+ private static final String EMPTY_STRING = "";
+
+ /**
+ * Execute pre-install operations for installed facet
+ *
+ * @param project created after finish pressed in wizard
+ * @param fv -IProjectFacetversion described facet that will be installed
+ * @param config - IDataModel that provide data collected from user
+ * @param monitor - IProgressMonitor
+ * @throws CoreException when meet the problems
+ */
public void execute(IProject project, IProjectFacetVersion fv,
Object config, IProgressMonitor monitor) throws CoreException {
- IDataModel model = (IDataModel)config;
+ IDataModel model = (IDataModel) config;
- if(model.getProperty(ISeamFacetDataModelProperties.SEAM_CONNECTION_PROFILE)!=null) {
+ if (model.getProperty(ISeamFacetDataModelProperties.SEAM_CONNECTION_PROFILE) != null) {
IConnectionProfile connProfile = ProfileManager.getInstance().getProfileByName(model.getProperty(ISeamFacetDataModelProperties.SEAM_CONNECTION_PROFILE).toString());
- Properties props = connProfile.getBaseProperties(); //Properties("org.eclipse.datatools.connectivity.db.generic.connectionProfile");
+ if (connProfile!=null) {
+ Properties props = connProfile.getBaseProperties(); //Properties("org.eclipse.datatools.connectivity.db.generic.connectionProfile");
- // Collect properties name from DTP Connection Profile
- model.setProperty(ISeamFacetDataModelProperties.DB_USER_NAME,
- props.get("org.eclipse.datatools.connectivity.db.username")==null //$NON-NLS-1$
- ?"":props.get("org.eclipse.datatools.connectivity.db.username").toString()); //$NON-NLS-1$ //$NON-NLS-2$
-
- model.setProperty(ISeamFacetDataModelProperties.JDBC_DRIVER_CLASS_NAME,
- props.get("org.eclipse.datatools.connectivity.db.driverClass")==null //$NON-NLS-1$
- ?"":props.get("org.eclipse.datatools.connectivity.db.driverClass").toString()); //$NON-NLS-1$ //$NON-NLS-2$
-
- model.setProperty(ISeamFacetDataModelProperties.DB_USER_PASSWORD,
- props.get("org.eclipse.datatools.connectivity.db.password")==null //$NON-NLS-1$
- ?"":props.get("org.eclipse.datatools.connectivity.db.password").toString()); //$NON-NLS-1$ //$NON-NLS-2$
-
- model.setProperty(ISeamFacetDataModelProperties.JDBC_URL_FOR_DB,
- props.get("org.eclipse.datatools.connectivity.db.URL")==null //$NON-NLS-1$
- ?"":props.get("org.eclipse.datatools.connectivity.db.URL").toString()); //$NON-NLS-1$ //$NON-NLS-2$
-
- model.setProperty(ISeamFacetDataModelProperties.JDBC_DRIVER_JAR_PATH,
- DriverManager.getInstance().getDriverInstanceByID(
- props.get("org.eclipse.datatools.connectivity.driverDefinitionID").toString()).getJarListAsArray()); //$NON-NLS-1$
+ // Collect properties name from DTP Connection Profile
+ model.setProperty(ISeamFacetDataModelProperties.DB_USER_NAME,
+ props.get("org.eclipse.datatools.connectivity.db.username") == null //$NON-NLS-1$
+ ? "" : props.get("org.eclipse.datatools.connectivity.db.username").toString()); //$NON-NLS-1$ //$NON-NLS-2$
+
+ model.setProperty(ISeamFacetDataModelProperties.JDBC_DRIVER_CLASS_NAME,
+ props.get("org.eclipse.datatools.connectivity.db.driverClass") == null //$NON-NLS-1$
+ ? "" : props.get("org.eclipse.datatools.connectivity.db.driverClass").toString()); //$NON-NLS-1$ //$NON-NLS-2$
+
+ model.setProperty(ISeamFacetDataModelProperties.DB_USER_PASSWORD,
+ props.get("org.eclipse.datatools.connectivity.db.password") == null //$NON-NLS-1$
+ ? "" : props.get("org.eclipse.datatools.connectivity.db.password").toString()); //$NON-NLS-1$ //$NON-NLS-2$
+
+ model.setProperty(ISeamFacetDataModelProperties.JDBC_URL_FOR_DB,
+ props.get("org.eclipse.datatools.connectivity.db.URL") == null //$NON-NLS-1$
+ ? "" : props.get("org.eclipse.datatools.connectivity.db.URL").toString()); //$NON-NLS-1$ //$NON-NLS-2$
+
+ model.setProperty(ISeamFacetDataModelProperties.JDBC_DRIVER_JAR_PATH,
+ DriverManager.getInstance().getDriverInstanceByID(
+ props.get("org.eclipse.datatools.connectivity.driverDefinitionID").toString()).getJarListAsArray()); //$NON-NLS-1$
+ }
}
+
+ String defaultSchema = (String) model.getProperty(ISeamFacetDataModelProperties.DB_DEFAULT_SCHEMA_NAME);
+
+ if (!EMPTY_STRING.equals(defaultSchema)) {
+ model.setStringProperty(ISeamFacetDataModelProperties.DB_SCHEMA_NAME,
+ PROP_INDENT + NLS.bind(PROP_DECL,
+ new String[]{
+ ISeamFacetDataModelProperties.DB_DEFAULT_SCHEMA_NAME,
+ defaultSchema}));
+ }
+
+ String defaultCatalog = (String) model.getProperty(ISeamFacetDataModelProperties.DB_DEFAULT_CATALOG_NAME);
+
+ if (!EMPTY_STRING.equals(defaultCatalog)) {
+ model.setStringProperty(ISeamFacetDataModelProperties.DB_CATALOG_NAME,
+ PROP_INDENT + NLS.bind(PROP_DECL,
+ new String[]{
+ ISeamFacetDataModelProperties.DB_DEFAULT_CATALOG_NAME,
+ defaultCatalog}));
+ }
}
}
17 years
JBoss Tools SVN: r5501 - trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-01-03 20:54:58 -0500 (Thu, 03 Jan 2008)
New Revision: 5501
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java
Log:
http://jira.jboss.org/jira/browse/JBIDE-1544
Need add @catalogProperty@@schemaProperty@ back to persistence.xml templates file in seam-gen.
JUnit tests also added.
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java 2008-01-04 01:54:54 UTC (rev 5500)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java 2008-01-04 01:54:58 UTC (rev 5501)
@@ -499,7 +499,7 @@
}
public static IType getValidType(IProject project, String className) {
- if (className == null && className.length() == 0) return null;
+ if (className == null || className.length() == 0) return null;
IJavaProject javaProject = getJavaProject(project);
if(javaProject == null) return null;
IFile f = null;
@@ -546,7 +546,7 @@
* Returns true only if project has no sources but output contains *.class file
*/
public static boolean isContainedInOutput(IProject project, String className) {
- if (className == null && className.length() == 0) return false;
+ if (className == null || className.length() == 0) return false;
IJavaProject javaProject = getJavaProject(project);
if(javaProject == null) return false;
try {
17 years