JBoss Tools SVN: r4406 - trunk/documentation/GettingStartedGuide/docs/userguide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ykryvinchanka
Date: 2007-10-22 08:22:59 -0400 (Mon, 22 Oct 2007)
New Revision: 4406
Modified:
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/ManageJBossAS.xml
Log:
http://jira.jboss.com/jira/browse/RHDS-150 GSG guide. Meaningful words in figures titles start with uppercase letter, created highlighting for paths and phrases, corrected some grammar mistakes.
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/ManageJBossAS.xml
===================================================================
--- trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/ManageJBossAS.xml 2007-10-22 12:05:35 UTC (rev 4405)
+++ trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/ManageJBossAS.xml 2007-10-22 12:22:59 UTC (rev 4406)
@@ -11,7 +11,7 @@
</keywordset>
</chapterinfo>
<title>Manage JBoss AS from Red Hat Developer Studio</title>
- <para>Red Hat Developer Studio ships with <property>JBoss EAP v.4.2</property> bundled. When you followed the default installation of Red Hat Developer Studio, you should already have a <property>JBoss 4.2 server</property> installed and defined. To run <property>JBoss AS 4.2</property> you need JDK 1.5., JDK 6 is not formally supported yet, although you may be able to start the server with it.</para>
+ <para>Red Hat Developer Studio ships with <property>JBoss EAP v.4.2</property> bundled. When you followed the default installation of Red Hat Developer Studio, you should already have a JBoss 4.2 server installed and defined. To run JBoss AS 4.2 you need <property>JDK 1.5.</property>, JDK 6 is not formally supported yet, although you may be able to start the server with it.</para>
<section id="JBossbundled">
<?dbhtml filename="JBossbundled.html"?>
<title>How to Manage the JBoss AS Bundled in RHDS</title>
@@ -19,12 +19,12 @@
<section id="StartingServer">
<?dbhtml filename="StartingServer.html"?>
<title>Starting JBoss server</title>
- <para>Starting <property>JBoss server</property> is quite simple. Red Hat Developer Studio allows you to control its behaviour with the help of a special toolbar: where you could start it in a regular or debug mode, stop it, or restart it.</para>
+ <para>Starting <property>JBoss server</property> is quite simple. Red Hat Developer Studio allows you to control its behaviour with the help of a special toolbar: where you could start it in a regular or debug mode, stop it or restart it.</para>
<itemizedlist>
<listitem><para>To launch the server click the green-with-white-arrow icon on the <property>JBoss Server View </property>or right click server name in this view and select <emphasis><property>Start</property></emphasis>. If this view is not open, select <emphasis><property>Window > Show View > Other > Server > JBoss Server View</property></emphasis></para></listitem>
</itemizedlist>
<figure>
-<title>Starting From Icon</title>
+<title>Starting from Icon</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/startingfromicon.png"/>
@@ -41,10 +41,10 @@
</mediaobject>
</figure>
-<para>While launching, Server output is written to the Console view:</para>
+<para>While launching, server output is written to the Console view:</para>
<figure>
-<title>Console output</title>
+<title>Console Output</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/consoleoutput.png"/>
@@ -53,14 +53,14 @@
</figure>
<para>When the server is started you should see <emphasis><property>Started</property></emphasis> right to its name in <property>JBoss Server View</property> (column "Status").</para>
<figure>
-<title>Server is Started</title>
+<title>Server Is Started</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/serverstarted.png"/>
</imageobject>
</mediaobject>
</figure>
- <para>To see event log after the server is started, expand <property>Event Log</property> branch beneath <property>JBoss Server View</property>:</para>
+ <para>To see event log after the server is started, expand <property>Event Log</property> branch beneath JBoss Server View:</para>
<figure>
<title>Event Log</title>
<mediaobject>
@@ -72,10 +72,10 @@
</section>
<section id="StoppingJBoss">
<?dbhtml filename="StoppingJBoss.html"?>
- <title>Stopping JBoss server</title>
- <para>To stop the server, click the <emphasis><property>Stop</property></emphasis> icon in <property>JBoss Server View </property> or right click the server name and press <emphasis><property>Stop</property></emphasis>.</para>
+ <title>Stopping JBoss Server</title>
+ <para>To stop the server, click the <emphasis><property>Stop</property></emphasis> icon in JBoss Server View or right click the server name and press <emphasis><property>Stop</property></emphasis>.</para>
<figure>
-<title>Stopping server</title>
+<title>Stopping Server</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/stoppingserver2.png"/>
@@ -87,18 +87,18 @@
<section id="ServerPreferences">
<?dbhtml filename="ServerPreferences.html"?>
<title>Server Container Preferences</title>
- <para>You can control how Red Hat Developer Studio interacts with servlet containers in Preferences. Select <emphasis><property>Window > Preferences > JBoss Tools > JBoss Servers</property></emphasis> and switch to the desired server:</para>
+ <para>You can control how Red Hat Developer Studio interacts with <property>servlet containers</property> in Preferences. Select <emphasis><property>Window > Preferences > JBoss Tools > JBoss Servers</property></emphasis> and switch to the desired server:</para>
<figure>
-<title>Server preferences</title>
+<title>Server Preferences</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/serverpreferences.png"/>
</imageobject>
</mediaobject>
</figure>
- <para>Also you can double click the server name in <property>JBoss Server View</property> and open an overview of the server. Here you can specify some common settings: host name, server name, runtime and so on.</para>
+ <para>Also you can double click the server name in JBoss Server View and open an overview of the server. Here you can specify some common settings: host name, server name, runtime and so on.</para>
<figure>
-<title>Server overview</title>
+<title>Server Overview</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/serveroverview.png"/>
@@ -136,12 +136,12 @@
<title>Adding and configuring JBoss server</title>
<para>Now we should add just installed server into server manager in Red Hat Developer Studio.</para>
<itemizedlist>
- <listitem><para>Open the <property>JBoss Server</property> View by selecting <emphasis>Window > Show View > Other > Server > JBoss Server View</emphasis>. You will see <property>JBoss Server</property> view.</para></listitem>
- <listitem><para>Right click anywhere in this view and select New Server.</para></listitem>
-<listitem><para>Select <emphasis>JBoss, a division of Red Hat > JBoss v4.2</emphasis> and click the "Installed Runtimes" button to select a new installed runtime.</para></listitem>
+ <listitem><para>Open the JBoss Server View by selecting <emphasis><property>Window > Show View > Other > Server > JBoss Server View</property></emphasis>. You will see JBoss Server view.</para></listitem>
+ <listitem><para>Right click anywhere in this view and select <emphasis><property>New Server</property></emphasis>.</para></listitem>
+ <listitem><para>Select <emphasis><property>JBoss, a division of Red Hat > JBoss v4.2</property></emphasis> and click the <emphasis><property>Installed Runtimes</property></emphasis> button to select a new installed runtime.</para></listitem>
</itemizedlist>
<figure>
-<title>Selecting server type</title>
+<title>Selecting Server Type</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/servertype.png"/>
@@ -150,8 +150,8 @@
</figure>
<itemizedlist continuation="continues">
- <listitem><para>Click "Add" button to add a new jboss runtime.</para></listitem>
- <listitem><para>Select <emphasis>JBoss, a division of Red Hat > JBoss v4.2</emphasis> and press Next.</para></listitem>
+ <listitem><para>Click <emphasis><property>Add</property></emphasis> button to add a new jboss runtime.</para></listitem>
+ <listitem><para>Select <emphasis><property>JBoss, a division of Red Hat > JBoss v4.2</property></emphasis> and press <emphasis><property>Next</property></emphasis>.</para></listitem>
</itemizedlist>
<figure>
@@ -181,19 +181,19 @@
<para>When adding a new server you will need to specify what JRE to use. It is important to set this value to a full JDK, not JRE. Again, you need a full JDK to run Web applications, JRE will not be enough.</para>
</note>
<itemizedlist continuation="continues">
- <listitem><para>In the following window leave all settings default or give your name to a new jboss server and press Finish.</para></listitem>
+ <listitem><para>In the following window leave all settings default or give your name to a new jboss server and press <emphasis><property>Finish</property></emphasis>.</para></listitem>
</itemizedlist>
<figure>
-<title>Adding new runtime</title>
+<title>Adding New Runtime</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/addingjbossserver.png"/>
</imageobject>
</mediaobject>
</figure>
- <para>A new runtime will now appear in the <emphasis>Preferences > Server > Installed Runtimes</emphasis> dialog.</para>
+ <para>A new runtime will now appear in the <emphasis><property>Preferences > Server > Installed Runtimes</property></emphasis> dialog.</para>
<figure>
-<title>Runtime is added</title>
+<title>Runtime Is Added</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/addedruntime.png"/>
@@ -202,10 +202,10 @@
</figure>
<itemizedlist continuation="continues">
- <listitem><para>Click OK. Then select a new added runtime in Server runtime drop down list and click Next button twice.</para></listitem>
+ <listitem><para>Click <emphasis><property>OK</property></emphasis>. Then select a new added runtime in Server runtime drop down list and click <emphasis><property>Next</property></emphasis> button twice.</para></listitem>
</itemizedlist>
<figure>
-<title>Choosing runtime</title>
+<title>Choosing Runtime</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/choosingruntime.png"/>
@@ -213,7 +213,7 @@
</mediaobject>
</figure>
<itemizedlist continuation="continues">
- <listitem><para>In the last wizard's dialog modify the projects that are configured on the server and click Finish.</para></listitem>
+ <listitem><para>In the last wizard's dialog modify the projects that are configured on the server and click <emphasis><property>Finish</property></emphasis>.</para></listitem>
</itemizedlist>
<figure>
<title>Configuring Projects</title>
@@ -223,7 +223,7 @@
</imageobject>
</mediaobject>
</figure>
- <para>A new JBoss server should now appear in <property>JBoss Server View</property>.</para>
+ <para>A new JBoss server should now appear in JBoss Server View.</para>
<figure>
<title>New JBoss Server</title>
<mediaobject>
@@ -245,14 +245,13 @@
<section id="JBossASPerspective">
<title>JBoss AS Perspective</title>
- <para>The <property>JBoss AS</property> Perspective is similar to the Java perspective, but it contains a few additional views, as well as an addition to the workbench
- toolbar. Two of the additional views are standard views, specifically the <property>Console </property> view and the <property>Properties</property> view.
+ <para>The <property>JBoss AS</property> Perspective is similar to the Java perspective, but it contains a few additional views. Two of the additional views are standard views, specifically the <property>Console </property> view and the <property>Properties</property> view.
The other two views that are added are the <property>Project archives</property> view and the <property>JBoss Servers View</property>.</para>
<section id="JBossServersView">
<?dbhtml filename="JBossServerView.html"?>
<title>The JBoss Servers View</title>
- <para>This chapter will focus on the the JBoss Server's View and it's related workbench toolbar actionsets. The JBoss Servers View is based on the Webtool's view, Servers View. The top half of the JBoss Servers View essentially embeds the original Servers View directly into it, making slight changes to the context menu.
+ <para>This chapter will focus on the the JBoss Server's View. The JBoss Servers View is based on the Webtool's view, Servers View. The top half of the JBoss Servers View essentially embeds the original Servers View directly into it, making slight changes to the context menu.
A second half was added to provide additional information about the server selected in the top half. In the image provided, categories in the second half include which modules are currently deployed.</para>
<figure>
@@ -265,7 +264,7 @@
</figure>
- <para>In order to access the view's preferences, you should access <emphasis><property>Window > Preferences > JBoss IDE > JBoss Servers > View</property></emphasis>.
+ <para>In order to access the view's preferences, you should access <emphasis><property>Window > Preferences > JBoss Tools > JBoss Servers > View</property></emphasis>.
This preference page allows you to select which view extensions you want on or off, the order they appear
in the view, as well as any other extension-specific preferences that may be available.</para>
<figure>
@@ -330,8 +329,8 @@
</imageobject>
</mediaobject>
</figure>
- <para>The view itself contains only a list of categories. By right-clicking on XML Configuration, you can create a new category.
- Ports is provided by default and is filled with many of the most commonly used ports in the JBoss Server</para>
+ <para>The view itself contains only a list of categories. By right-clicking on <emphasis><property>XML Configuration</property></emphasis>, you can create a new category.
+ Ports are provided by default and is filled with many of the most commonly used ports in the JBoss Server.</para>
<figure>
<title>Adding New Category</title>
<mediaobject>
@@ -340,8 +339,7 @@
</imageobject>
</mediaobject>
</figure>
- <para>The view itself contains only a list of categories. By right-clicking on XML XPaths, you can create a new category.
- Ports is provided by default and is filled with many of the most commonly used ports in the JBoss Server.</para>
+ <para>By right-clicking on <emphasis><property>Ports</property></emphasis>, you can create a new XPaths.</para>
<figure>
<title>Adding New XPath</title>
<mediaobject>
@@ -350,8 +348,7 @@
</imageobject>
</mediaobject>
</figure>
- <para>To begin, you can either right-click on a category in the view, or when browsing a category in the properties view,
- right-clicking anywhere. This will allow you to select New XPath. After that, the dialog shown below will appear.</para>
+ <para>After that, the dialog shown below will appear.</para>
<figure>
<title>Adding New XPath</title>
<mediaobject>
@@ -366,7 +363,7 @@
should be left blank and your xpath should end with port.
If, on the other hand, your desired field is the port attribute of <fieldName port="35">, then your xpath will end
with fieldName and your Attribute Name will be "port".
- When finished, you can click preview to see how many matches you have for that particular xpath, as shown below.</para>
+ When finished, you can click <emphasis><property>preview</property></emphasis> to see how many matches you have for that particular xpath, as shown below.</para>
<figure>
<title>XPath Preview</title>
<mediaobject>
@@ -387,12 +384,12 @@
root, etc. None of these have any effect on the functionality of the packaging plugin.</para>
<section id="Creating an archive">
- <title>Creating an archive</title>
+ <title>Creating an Archive</title>
<para>When creating a new archive, you have some different options at your disposal. If the project has no <property>.packages</property> file, your
- options will be presented to you all at once for you to choose from (as above). Otherwise you will right-click inside the view and select New Archive
+ options will be presented to you all at once for you to choose from (as above). Otherwise you will right-click inside the view and select <emphasis><property>New Archive</property></emphasis>
to see your archive type options.</para>
<figure>
- <title>Create an archive</title>
+ <title>Create an Archive</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/archives1.png"/>
@@ -437,7 +434,7 @@
<section id="View Actions">
<title>View Actions</title>
<figure>
- <title>Context menu on the item</title>
+ <title>Context Menu on the Item</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/archives3.png"/>
17 years, 2 months
JBoss Tools SVN: r4405 - in trunk/seam/plugins/org.jboss.tools.seam.core: src/org/jboss/tools/seam/core and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-10-22 08:05:35 -0400 (Mon, 22 Oct 2007)
New Revision: 4405
Added:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamRuntimeValidation.java
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/plugin.xml
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCoreBuilder.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/SeamRuntimeManager.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/xml/XMLScanner.java
Log:
JBIDE-982
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/plugin.xml
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/plugin.xml 2007-10-22 11:58:56 UTC (rev 4404)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/plugin.xml 2007-10-22 12:05:35 UTC (rev 4405)
@@ -282,7 +282,8 @@
id="seamProblem"
name="Seam Problem"
point="org.eclipse.core.resources.markers">
- <super type="org.eclipse.wst.validation.problemmarker"/>
+ <super type="org.eclipse.wst.validation.problemmarker"/>
+ <attribute name="kind"/>
<persistent
value="true">
</persistent>
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCoreBuilder.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCoreBuilder.java 2007-10-22 11:58:56 UTC (rev 4404)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCoreBuilder.java 2007-10-22 12:05:35 UTC (rev 4405)
@@ -26,6 +26,7 @@
import org.jboss.tools.seam.internal.core.scanner.java.JavaScanner;
import org.jboss.tools.seam.internal.core.scanner.lib.LibraryScanner;
import org.jboss.tools.seam.internal.core.scanner.xml.XMLScanner;
+import org.jboss.tools.seam.internal.core.validation.SeamRuntimeValidation;
public class SeamCoreBuilder extends IncrementalProjectBuilder {
public static String BUILDER_ID = "org.jboss.tools.seam.core.seambuilder"; //$NON-NLS-1$
@@ -85,7 +86,9 @@
if(sp.getClassPath().update()) {
sp.getClassPath().process();
}
-
+
+ new SeamRuntimeValidation().validate(sp);
+
if (kind == FULL_BUILD) {
fullBuild(monitor);
} else {
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/SeamRuntimeManager.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/SeamRuntimeManager.java 2007-10-22 11:58:56 UTC (rev 4404)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/SeamRuntimeManager.java 2007-10-22 12:05:35 UTC (rev 4405)
@@ -18,11 +18,14 @@
import java.util.Map;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.preference.IPersistentPreferenceStore;
import org.eclipse.jface.preference.IPreferenceStore;
import org.jboss.tools.seam.core.ISeamProject;
import org.jboss.tools.seam.core.SeamCorePlugin;
import org.jboss.tools.seam.internal.core.project.facet.SeamFacetPreferenceInitializer;
+import org.jboss.tools.seam.internal.core.validation.SeamRuntimeValidation;
/**
* @author eskimo
@@ -36,6 +39,8 @@
private SeamRuntime defaultRt = null;
+ private SeamRuntimeValidation validator = new SeamRuntimeValidation();
+
/**
*
*/
@@ -100,6 +105,7 @@
}
runtimes.put(runtime.getName(),runtime);
save();
+ validateProjects();
}
/**
@@ -136,6 +142,7 @@
*/
public void removeRuntime(SeamRuntime rt) {
runtimes.remove(rt.getName());
+ validateProjects();
}
/**
@@ -193,4 +200,18 @@
}
return result;
}
+
+ private void validateProjects() {
+ IProject[] ps = ResourcesPlugin.getWorkspace().getRoot().getProjects();
+ for (int i = 0; i < ps.length; i++) {
+ ISeamProject sp = SeamCorePlugin.getSeamProject(ps[i], false);
+ if(sp == null) continue;
+ try {
+ validator.validate(sp);
+ } catch (CoreException e) {
+ SeamCorePlugin.getPluginLog().logError(e);
+ }
+ }
+ }
+
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/xml/XMLScanner.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/xml/XMLScanner.java 2007-10-22 11:58:56 UTC (rev 4404)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/xml/XMLScanner.java 2007-10-22 12:05:35 UTC (rev 4405)
@@ -139,6 +139,11 @@
factory.setValue(new XMLValueInfo(os[i], "value")); //$NON-NLS-1$
factory.setMethod(new XMLValueInfo(os[i], "method")); //$NON-NLS-1$
ds.getFactories().add(factory);
+ } else if(os[i].getModelEntity().getName().startsWith("SeamImport")) { //$NON-NLS-1$
+ String v = os[i].getAttributeValue("import");
+ if(v != null && v.length() > 0 && !ds.getImports().contains(v)) {
+ ds.getImports().add(v);
+ }
}
}
return ds;
Added: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamRuntimeValidation.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamRuntimeValidation.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamRuntimeValidation.java 2007-10-22 12:05:35 UTC (rev 4405)
@@ -0,0 +1,102 @@
+/*******************************************************************************
+ * 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.seam.internal.core.validation;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.jboss.tools.seam.core.ISeamProject;
+import org.jboss.tools.seam.core.SeamCorePlugin;
+import org.jboss.tools.seam.core.project.facet.SeamRuntime;
+
+/**
+ * @author Viacheslav Kabanovich
+ */
+public class SeamRuntimeValidation {
+ static final String TYPE = "org.jboss.tools.seam.core.seamProblem";
+ static final String ATTR_KIND = "kind";
+ static final String RUNTIME_KIND = "SeamRuntimeProblem";
+
+ public SeamRuntimeValidation() {}
+
+ public void validate(ISeamProject project) throws CoreException {
+ IMarker marker = findErrorMarker(project);
+ String runtimeName = project.getRuntimeName();
+ SeamRuntime runtime = project.getRuntime();
+ if(runtime != null || runtimeName == null || runtimeName.length() == 0) {
+ if(marker == null) return;
+ removeMarker(marker);
+ return;
+ }
+ String message = "Seam runtime " + runtimeName + " does not exist.";
+ if(marker != null) {
+ if(message.equals(marker.getAttribute(IMarker.MESSAGE, null))) {
+ return;
+ }
+ marker.setAttribute(IMarker.MESSAGE, message);
+ } else {
+ createMarker(project, message);
+ }
+ }
+
+ private IMarker findErrorMarker(ISeamProject project) throws CoreException {
+ IMarker[] ms = project.getProject().findMarkers(TYPE, true, IResource.DEPTH_ZERO);
+ if(ms == null) return null;
+ for (int i = 0; i < ms.length; i++) {
+ int s = ms[i].getAttribute(IMarker.SEVERITY, IMarker.SEVERITY_ERROR);
+ if(s != IMarker.SEVERITY_WARNING) continue;
+ String kind = ms[i].getAttribute(ATTR_KIND, null);
+ if(kind == null) continue;
+ if(kind.equals(RUNTIME_KIND)) {
+ return ms[i];
+ }
+ }
+ return null;
+ }
+
+ private void removeMarker(final IMarker marker) {
+ IWorkspaceRunnable r = new IWorkspaceRunnable() {
+ public void run(IProgressMonitor monitor) throws CoreException {
+ marker.delete();
+ }
+ };
+ run(r);
+ }
+
+ private void createMarker(final ISeamProject project, final String message) throws CoreException {
+ IWorkspaceRunnable r = new IWorkspaceRunnable() {
+ public void run(IProgressMonitor monitor) throws CoreException {
+ doCreateMarker(project, message);
+ }
+ };
+ run(r);
+ }
+
+ private void doCreateMarker(ISeamProject project, String message) throws CoreException {
+ IMarker marker = project.getProject().createMarker(TYPE);
+ marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_WARNING);
+ marker.setAttribute(IMarker.MESSAGE, message);
+ marker.setAttribute(ATTR_KIND, RUNTIME_KIND);
+ }
+
+ private void run(IWorkspaceRunnable r) {
+ try {
+ ResourcesPlugin.getWorkspace().run(r, null,IWorkspace.AVOID_UPDATE, null);
+ } catch (CoreException e) {
+ SeamCorePlugin.getPluginLog().logError(e);
+ }
+ }
+
+}
17 years, 2 months
JBoss Tools SVN: r4404 - trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-10-22 07:58:56 -0400 (Mon, 22 Oct 2007)
New Revision: 4404
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencePage.java
Log:
JBIDE-982
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencePage.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencePage.java 2007-10-22 11:18:04 UTC (rev 4403)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencePage.java 2007-10-22 11:58:56 UTC (rev 4404)
@@ -98,9 +98,11 @@
for (SeamRuntime rt : seamRuntimes.getAddedSeamRuntimes()) {
SeamRuntimeManager.getInstance().addRuntime(rt);
}
+ seamRuntimes.getAddedSeamRuntimes().clear();
for (SeamRuntime rt : seamRuntimes.getRemoved()) {
SeamRuntimeManager.getInstance().removeRuntime(rt);
}
+ seamRuntimes.getRemoved().clear();
if(initialDefault != null && seamRuntimes.getDefaultSeamRuntime() != initialDefault) {
initialDefault.setDefault(false);
}
17 years, 2 months
JBoss Tools SVN: r4403 - in trunk: jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2007-10-22 07:18:04 -0400 (Mon, 22 Oct 2007)
New Revision: 4403
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/META-INF/MANIFEST.MF
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/RedHat4WebPerspectiveFactory.java
trunk/seam/plugins/org.jboss.tools.seam.ui/META-INF/MANIFEST.MF
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamPerspectiveFactory.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1121
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/META-INF/MANIFEST.MF 2007-10-22 10:46:21 UTC (rev 4402)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/META-INF/MANIFEST.MF 2007-10-22 11:18:04 UTC (rev 4403)
@@ -80,6 +80,7 @@
org.eclipse.jst.servlet.ui,
org.eclipse.wst.common.project.facet.ui,
org.eclipse.core.resources,
- org.eclipse.core.runtime
+ org.eclipse.core.runtime,
+ org.eclipse.debug.ui
Bundle-Version: 2.0.0
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/RedHat4WebPerspectiveFactory.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/RedHat4WebPerspectiveFactory.java 2007-10-22 10:46:21 UTC (rev 4402)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/RedHat4WebPerspectiveFactory.java 2007-10-22 11:18:04 UTC (rev 4403)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.jst.web.ui;
+import org.eclipse.debug.ui.IDebugUIConstants;
import org.eclipse.jdt.ui.JavaUI;
import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPageLayout;
@@ -51,6 +52,7 @@
IFolderLayout rightBottom = layout.createFolder("rightBottom", IPageLayout.BOTTOM, (float)0.64, "right"); //$NON-NLS-1$
rightBottom.addView(IPageLayout.ID_OUTLINE);
+ layout.addActionSet(IDebugUIConstants.LAUNCH_ACTION_SET);
layout.addActionSet(JavaUI.ID_ACTION_SET);
layout.addActionSet(JavaUI.ID_ELEMENT_CREATION_ACTION_SET);
layout.addActionSet(IPageLayout.ID_NAVIGATE_ACTION_SET);
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/META-INF/MANIFEST.MF 2007-10-22 10:46:21 UTC (rev 4402)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/META-INF/MANIFEST.MF 2007-10-22 11:18:04 UTC (rev 4403)
@@ -50,7 +50,8 @@
org.jboss.tools.common.model.ui,
org.hibernate.eclipse,
org.eclipse.wst.server.core,
- org.eclipse.wst.server.ui
+ org.eclipse.wst.server.ui,
+ org.eclipse.debug.ui
Eclipse-LazyStart: true
Export-Package: org.jboss.tools.seam.ui,
org.jboss.tools.seam.ui.actions,
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamPerspectiveFactory.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamPerspectiveFactory.java 2007-10-22 10:46:21 UTC (rev 4402)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamPerspectiveFactory.java 2007-10-22 11:18:04 UTC (rev 4403)
@@ -1,5 +1,6 @@
package org.jboss.tools.seam.ui;
+import org.eclipse.debug.ui.IDebugUIConstants;
import org.eclipse.jdt.ui.JavaUI;
import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPageLayout;
@@ -40,6 +41,7 @@
IFolderLayout rightBottom = layout.createFolder("rightBottom", IPageLayout.BOTTOM, (float)0.64, "right"); //$NON-NLS-1$ //$NON-NLS-2$
rightBottom.addView(IPageLayout.ID_OUTLINE);
+ layout.addActionSet(IDebugUIConstants.LAUNCH_ACTION_SET);
layout.addActionSet(JavaUI.ID_ACTION_SET);
layout.addActionSet(JavaUI.ID_ELEMENT_CREATION_ACTION_SET);
layout.addActionSet(IPageLayout.ID_NAVIGATE_ACTION_SET);
17 years, 2 months
JBoss Tools SVN: r4402 - in trunk/documentation/GettingStartedGuide/docs/userguide/en: modules and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: afedosik
Date: 2007-10-22 06:46:21 -0400 (Mon, 22 Oct 2007)
New Revision: 4402
Added:
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/archives1.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/archives2.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/archives3.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/archives4.png
Modified:
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/Enableprefer.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/ManageJBossAS.xml
Log:
http://jira.jboss.com/jira/browse/RHDS-187 Chapter update
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/Enableprefer.png
===================================================================
(Binary files differ)
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/archives1.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/archives1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/archives2.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/archives2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/archives3.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/archives3.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/archives4.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/archives4.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/ManageJBossAS.xml
===================================================================
--- trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/ManageJBossAS.xml 2007-10-21 15:57:17 UTC (rev 4401)
+++ trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/ManageJBossAS.xml 2007-10-22 10:46:21 UTC (rev 4402)
@@ -21,7 +21,7 @@
<title>Starting JBoss server</title>
<para>Starting <property>JBoss server</property> is quite simple. Red Hat Developer Studio allows you to control its behaviour with the help of a special toolbar: where you could start it in a regular or debug mode, stop it, or restart it.</para>
<itemizedlist>
- <listitem><para>To launch the server click the green-with-white-arrow icon on the <property>JBoss Server View </property>or right click server name in this view and select <emphasis><property>Start</property></emphasis>. If this view is not open, select <emphasis>Window > Show View > Other > Server > JBoss Server View</emphasis></para></listitem>
+ <listitem><para>To launch the server click the green-with-white-arrow icon on the <property>JBoss Server View </property>or right click server name in this view and select <emphasis><property>Start</property></emphasis>. If this view is not open, select <emphasis><property>Window > Show View > Other > Server > JBoss Server View</property></emphasis></para></listitem>
</itemizedlist>
<figure>
<title>Starting From Icon</title>
@@ -51,7 +51,7 @@
</imageobject>
</mediaobject>
</figure>
-<para>When the server is started you should see "Started" right to its name in <property>JBoss Server</property> view (column "Status").</para>
+ <para>When the server is started you should see <emphasis><property>Started</property></emphasis> right to its name in <property>JBoss Server View</property> (column "Status").</para>
<figure>
<title>Server is Started</title>
<mediaobject>
@@ -60,7 +60,7 @@
</imageobject>
</mediaobject>
</figure>
-<para>To see event log after the server is started, expand "Event Log" branch beneath <property>JBoss Server</property> View:</para>
+ <para>To see event log after the server is started, expand <property>Event Log</property> branch beneath <property>JBoss Server View</property>:</para>
<figure>
<title>Event Log</title>
<mediaobject>
@@ -82,12 +82,12 @@
</imageobject>
</mediaobject>
</figure>
-<para>When the server is stopped you will see "Stopped" next to its name in the Status column.</para>
+ <para>When the server is stopped you will see <emphasis><property>Stopped</property></emphasis> next to its name in the Status column.</para>
</section>
<section id="ServerPreferences">
<?dbhtml filename="ServerPreferences.html"?>
<title>Server Container Preferences</title>
- <para>You can control how Red Hat Developer Studio interacts with servlet containers in Preferences. In order to do this, select <emphasis>Window > Preferences > JBoss Tools > JBoss Servers</emphasis> and switch to the desired server:</para>
+ <para>You can control how Red Hat Developer Studio interacts with servlet containers in Preferences. Select <emphasis><property>Window > Preferences > JBoss Tools > JBoss Servers</property></emphasis> and switch to the desired server:</para>
<figure>
<title>Server preferences</title>
<mediaobject>
@@ -96,7 +96,7 @@
</imageobject>
</mediaobject>
</figure>
-<para>Also you can double click the server name in <property>JBoss Server</property> view and open an overview of the server. Here you can specify some common settings: host name, server name, runtime and so on.</para>
+ <para>Also you can double click the server name in <property>JBoss Server View</property> and open an overview of the server. Here you can specify some common settings: host name, server name, runtime and so on.</para>
<figure>
<title>Server overview</title>
<mediaobject>
@@ -118,8 +118,14 @@
<itemizedlist>
<listitem><para>Download the binary package of <property>JBoss 4.2.1</property> and save it on your computer: <ulink url="http://labs.jboss.com/jbossas/downloads">http://labs.jboss.com/jbossas/downloads</ulink></para></listitem>
</itemizedlist>
-<para>It does not matter where on your system you install <property>JBoss</property>. Note, however, that installing <property>JBoss</property> into a directory that has a name containing spaces causes problems in some situations with Sun-based VMs. Thus, try to avoid using installation folders that have spaces in their names.</para>
-<para>There is no requirement for root access to run <property>JBoss</property> on UNIX/Linux systems because none of the default ports are within the 0-1023 privileged port range.</para>
+ <para>It does not matter where on your system you install JBoss server.</para>
+
+ <note>
+ <title>Note:</title>
+ <para>The installation of JBoss server into a directory that has a name containing spaces provokes problems in some situations with Sun-based VMs. Try to avoid using installation folders that have spaces in their names.</para>
+ </note>
+
+ <para>There is no requirement for root access to run JBoss Server on UNIX/Linux systems because none of the default ports are within the 0-1023 privileged port range.</para>
<itemizedlist continuation="continues">
<listitem><para>After you have the binary archive you want to install, use the JDK jar tool (or any other ZIP extraction tool) to extract the jboss-4.2.1.zip archive contents into a location of your choice. The jboss-4.2.1.tgz archive is a gzipped tar file that requires a gnutar compatible tar which can handle the long pathnames in the archive. The extraction process will create a jboss-4.2.1 directory. </para></listitem>
</itemizedlist>
@@ -217,7 +223,7 @@
</imageobject>
</mediaobject>
</figure>
-<para>A new <property>JBoss server</property> should now appear in <property>JBoss Server</property> View.</para>
+ <para>A new JBoss server should now appear in <property>JBoss Server View</property>.</para>
<figure>
<title>New JBoss Server</title>
<mediaobject>
@@ -234,11 +240,15 @@
<section id="Server Manager Features">
- <?dbhtml filename="JBossbundled.html"?>
+ <?dbhtml filename="ServerManagerFeatures.html"?>
<title>Server Manager Features</title>
- <para>The JBoss AS Perspective is similar to the Java perspective, but it contains a few additional views, as well as an addition to the workbench toolbar. Two of the additional views are standard views, specifically the <property>Console view</property> and the <property>Properties view</property>. The other two views that are added are the <property>Archives View</property> and the <property>JBoss Servers View</property>.</para>
-
+ <section id="JBossASPerspective">
+ <title>JBoss AS Perspective</title>
+ <para>The <property>JBoss AS</property> Perspective is similar to the Java perspective, but it contains a few additional views, as well as an addition to the workbench
+ toolbar. Two of the additional views are standard views, specifically the <property>Console </property> view and the <property>Properties</property> view.
+ The other two views that are added are the <property>Project archives</property> view and the <property>JBoss Servers View</property>.</para>
+
<section id="JBossServersView">
<?dbhtml filename="JBossServerView.html"?>
<title>The JBoss Servers View</title>
@@ -255,8 +265,8 @@
</figure>
- <para>In order to access the view's preferences, you should access <emphasis><property>Window -> Preferences -> JBoss IDE -> JBoss Servers
- -> View</property></emphasis>. This preference page allows you to select which view extensions you want on or off, the order they appear
+ <para>In order to access the view's preferences, you should access <emphasis><property>Window > Preferences > JBoss IDE > JBoss Servers > View</property></emphasis>.
+ This preference page allows you to select which view extensions you want on or off, the order they appear
in the view, as well as any other extension-specific preferences that may be available.</para>
<figure>
<title>View Preferences</title>
@@ -366,11 +376,103 @@
</mediaobject>
</figure>
</section>
-
+ <section id="Project_archivesView">
+ <title>Project archives View</title>
+ <para>Every application, whether plain old Java, J2EE, or some other language altogether, needs to be packaged in some way. In Java-related projects,
+ many people use ANT. Red Hat Developer Studio comes with our own archives tool with a bit easier and less-verbose XML and a handy user interface.</para>
+ <para>The Project Archives plugin consists primarily of a view to set up each packaging configuration. Each project can enable or disable its builder, or depend on the global setting.</para>
+ <para>The packaging configuration for each project is stored in that project's root folder, and is in a file named .packages, which has a fairly simple XML
+ structure. Modifying the file by hand is neither required nor reccommended, and using the UI is the official way of modifying your packaging structure.</para>
+ <para>Aside from the builder, the other preferences for the plugin are mostly cosmetic, allowing you to show full or truncated paths, show the project at the
+ root, etc. None of these have any effect on the functionality of the packaging plugin.</para>
+
+ <section id="Creating an archive">
+ <title>Creating an archive</title>
+ <para>When creating a new archive, you have some different options at your disposal. If the project has no <property>.packages</property> file, your
+ options will be presented to you all at once for you to choose from (as above). Otherwise you will right-click inside the view and select New Archive
+ to see your archive type options.</para>
+ <figure>
+ <title>Create an archive</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/archives1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>JAR is the standard archive type, and does very little configuration, leaving most of the work up to you. You can customize the name, add folders,
+ filesets, and inner jars to it.</para>
+ <para>The other types, for the most part, simply start off with a default setting, usually the jar with some specific children based on an expected
+ structure of the project. For example, if the project is a dynamic web project, and you create a WAR archive, the archive will be created with a few filesets relevant to the known structure of the project.</para>
+
+ <para>Because the first page of all new archive wizards are the same, and it is also the only page in the New Jar Wizard, that page is shown below.</para>
+ <figure>
+ <title>New JAR Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/archives2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The page is pretty simple. All it asks is for the name of your new archive, a destination, which we'll get to in a moment, and whether the archive
+ is exploded or packaged up.</para>
+ <para>The destination of an archive can be anywhere on the filesystem, anywhere in the workspace, inside some other archive, or inside a folder
+ declared inside an archive. You can browse to workspace or filesystem destinations by clicking on their respective buttons. To select a destination
+ inside some other archive, you'll need to press the <property>Workspace...</property> button. At the bottom of the list, you'll see archives that have been declared in the
+ workspace.</para>
+ <section id="CreatingaFolder">
+ <title>Creating a Folder</title>
+ <para>Creating a folder is much easier. You simply right-click on an archive or folder you want your new folder to be a child under. The only piece of
+ required information is naming the file.</para>
+ </section>
+ <section id="CreatingaFileSet">
+ <title>Creating a FileSet</title>
+ <para>To create a new fileset, you click on an available target location such as an archive, a nested archive, or a folder within an archive, and select
+ New Fileset. The New Fileset Wizard requires a destination (where the files will go), and a root directory (or where the files are coming from).
+ The source can be anywhere in the workspace or from the filesystem at large.</para>
+ <para>Below that, the fileset requires only an includes pattern and an excludes pattern. As you type in either of these fields, the preview viewer should
+ update itself with which files are matched.</para>
+ </section>
+ </section>
+ <section id="View Actions">
+ <title>View Actions</title>
+ <figure>
+ <title>Context menu on the item</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/archives3.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>The context menu on the items in the view is extendable, but there are several that come standard. The first is the <property>Build Archive</property> action, enabled
+ only on top-level archives, which initiates a full build on that archive. Editing and deleting nodes are also standard actions, with deletion not needing
+ an explanation. The edit action brings up the wizard associated with that particular node type and allows the details to be changed. The final action
+ contribution here is the ability to publish to a declared server.</para>
+ </section>
+ <section id="PublishToServer">
+ <title>Publish to Server</title>
+ <figure>
+ <title>Context menu on the item</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/archives4.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>The dialog above appears after selecting <property>Publish To Server</property>. To simply publish once, you just select the server(s) that you want, and finish.
+ If you want the Publish to Server action on that particular Archive to always publish to that set of servers, then check the appropriate checkbox.
+ And finally, to enable automatic publishing upon build events, check the last checkbox.</para>
+ <para>The automatic publishing feature is nice if, for example, your package's destination (where it is built) is a temporary folder and you want the
+ archive published to several servers. If you only really want your archive published to one server, it might be easier to have the archive's destination
+ folder be the deploy folder of the server.</para>
+ </section>
+ </section>
+ </section>
+
<section id="Deploy to Server">
<?dbhtml filename="DeployToServer.html"?>
<title>Deploy to Server</title>
- <para>There is a <property>Deploy to server</property> in the context menu of files to allow single file deployement. To deploy these non-WTP files/projects right click on the file (-ds.xml, .ear, .jar etc.) and select <emphasis><property>Deploy To server</property></emphasis> and it will be automatically deployed.</para>
+ <para>In the context menu of files there is a <property>Deploy to server</property> option that allows a single file deployment. To deploy these non-WTP files/projects right click on the file (-ds.xml, .ear, .jar etc.) and select <emphasis><property>Deploy To server</property></emphasis> and it will be automatically deployed.</para>
<figure>
<title>Deploy to Sever</title>
<mediaobject>
@@ -379,7 +481,7 @@
</imageobject>
</mediaobject>
</figure>
- <para>The deployed files are listed side-by-side with other <property>modules</property> that are deployed to the server.</para>
+ <para>The deployed files are listed side-by-side with other modules that are deployed to the server.</para>
</section>
</section>
</chapter>
17 years, 2 months
JBoss Tools SVN: r4401 - trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2007-10-21 11:57:17 -0400 (Sun, 21 Oct 2007)
New Revision: 4401
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamActionWizard.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamActionWizardPage1.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseWizard.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseWizardPage.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamConversationWizard.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamConversationWizardPage1.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamEntityWizard.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamEntityWizardPage1.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamFormWizard.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamFormWizardPage1.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizardPage.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamWizardFactory.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamWizardUtils.java
Log:
JBIDE-1135 initialize seam wizards with proper seam project
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamActionWizard.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamActionWizard.java 2007-10-21 14:17:16 UTC (rev 4400)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamActionWizard.java 2007-10-21 15:57:17 UTC (rev 4401)
@@ -34,8 +34,13 @@
super(CREATE_SEAM_ACTION);
setWindowTitle(SeamUIMessages.SEAM_ACTION_WIZARD_NEW_SEAM_ACTION);
setDefaultPageImageDescriptor(ImageDescriptor.createFromFile(SeamActionWizard.class, "SeamFormWizBan.png")); //$NON-NLS-1$
- addPage(new SeamActionWizardPage1());
+
}
+
+ @Override
+ public void addPages() {
+ addPage(new SeamActionWizardPage1(getInitialSelection()));
+ }
public static IUndoableOperation CREATE_SEAM_ACTION = new SeamActionCreateOperation();
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamActionWizardPage1.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamActionWizardPage1.java 2007-10-21 14:17:16 UTC (rev 4400)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamActionWizardPage1.java 2007-10-21 15:57:17 UTC (rev 4401)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.seam.ui.wizard;
+import org.eclipse.jface.viewers.IStructuredSelection;
import org.jboss.tools.seam.ui.SeamUIMessages;
/**
@@ -23,22 +24,17 @@
* @param title
* @param titleImage
*/
- public SeamActionWizardPage1() {
- super("seam.new.action.page1", SeamUIMessages.SEAM_ACTION_WIZARD_PAGE1_SEAM_ACTION, null); //$NON-NLS-1$
+ public SeamActionWizardPage1(IStructuredSelection is) {
+ super("seam.new.action.page1", SeamUIMessages.SEAM_ACTION_WIZARD_PAGE1_SEAM_ACTION, null, is); //$NON-NLS-1$
setMessage(getDefaultMessageText());
}
-
- @Override
- protected void createEditors() {
- addEditors(SeamWizardFactory.createBaseFormFieldEditors(SeamWizardUtils.getSelectedProjectName()));
- }
+
/* (non-Javadoc)
* @see org.jboss.tools.seam.ui.wizard.SeamBaseWizardPage#getDefaultMessageText()
*/
@Override
public String getDefaultMessageText() {
- // TODO Auto-generated method stub
return "Create a new Seam action";
}
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseWizard.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseWizard.java 2007-10-21 14:17:16 UTC (rev 4400)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseWizard.java 2007-10-21 15:57:17 UTC (rev 4401)
@@ -43,6 +43,8 @@
private IUndoableOperation operation;
private IWorkbench workbench;
+
+ private IStructuredSelection selection;
/**
*
@@ -105,9 +107,18 @@
*/
public void init(IWorkbench workbench, IStructuredSelection selection) {
this.workbench = workbench;
+ this.setSelection(selection);
}
protected IFacetedProjectTemplate getTemplate() {
return ProjectFacetsManager.getTemplate("template.jst.seam"); //$NON-NLS-1$
}
+
+ public void setSelection(IStructuredSelection selection) {
+ this.selection = selection;
+ }
+
+ protected IStructuredSelection getInitialSelection() {
+ return selection;
+ }
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseWizardPage.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseWizardPage.java 2007-10-21 14:17:16 UTC (rev 4400)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseWizardPage.java 2007-10-21 15:57:17 UTC (rev 4401)
@@ -24,6 +24,7 @@
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
@@ -44,6 +45,8 @@
*/
public abstract class SeamBaseWizardPage extends WizardPage implements IAdaptable, PropertyChangeListener {
+ private final IStructuredSelection initialSelection;
+
/**
*
* @param pageName
@@ -51,21 +54,23 @@
* @param titleImage
*/
public SeamBaseWizardPage(String pageName, String title,
- ImageDescriptor titleImage) {
+ ImageDescriptor titleImage, IStructuredSelection initialSelection) {
super(pageName, title, titleImage);
+ this.initialSelection = initialSelection;
createEditors();
}
/**
* @param pageName
*/
- protected SeamBaseWizardPage(String pageName) {
+ protected SeamBaseWizardPage(String pageName, IStructuredSelection initSelection) {
super(pageName);
+ this.initialSelection = initSelection;
createEditors();
}
protected void createEditors() {
- addEditors(SeamWizardFactory.createBaseFormFieldEditors(SeamWizardUtils.getSelectedProjectName()));
+ addEditors(SeamWizardFactory.createBaseFormFieldEditors(SeamWizardUtils.getRootSeamProjectName(initialSelection)));
}
Map<String,IFieldEditor> editorRegistry = new HashMap<String,IFieldEditor>();
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamConversationWizard.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamConversationWizard.java 2007-10-21 14:17:16 UTC (rev 4400)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamConversationWizard.java 2007-10-21 15:57:17 UTC (rev 4401)
@@ -16,19 +16,27 @@
import org.eclipse.core.commands.operations.IUndoableOperation;
import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbench;
import org.jboss.tools.seam.internal.core.project.facet.ISeamFacetDataModelProperties;
import org.jboss.tools.seam.ui.SeamUIMessages;
public class SeamConversationWizard extends SeamBaseWizard implements INewWizard {
+
+
public SeamConversationWizard() {
super(CREATE_SEAM_CONVERSATION);
setWindowTitle(SeamUIMessages.SEAM_CONVERSATION_WIZARD_CREATE_NEW_CONVERSATION);
- setDefaultPageImageDescriptor(ImageDescriptor.createFromFile(SeamConversationWizard.class, "SeamWebProjectWizBan.png"));
- addPage(new SeamConversationWizardPage1());
+ setDefaultPageImageDescriptor(ImageDescriptor.createFromFile(SeamConversationWizard.class, "SeamWebProjectWizBan.png"));
}
+ @Override
+ public void addPages() {
+ super.addPages();
+ addPage(new SeamConversationWizardPage1(getInitialSelection()));
+ }
public static final IUndoableOperation CREATE_SEAM_CONVERSATION = new SeamConversationCreateOperation();
/**
*
@@ -77,5 +85,5 @@
ACTION_EAR_MAPPING.add(ACTION_WAR_MAPPING.get(2));
}
};
-
+
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamConversationWizardPage1.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamConversationWizardPage1.java 2007-10-21 14:17:16 UTC (rev 4400)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamConversationWizardPage1.java 2007-10-21 15:57:17 UTC (rev 4401)
@@ -13,6 +13,7 @@
import java.util.Map;
+import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.swt.widgets.Composite;
import org.jboss.tools.seam.ui.SeamUIMessages;
import org.jboss.tools.seam.ui.internal.project.facet.IValidator;
@@ -24,8 +25,11 @@
*/
public class SeamConversationWizardPage1 extends SeamBaseWizardPage {
- public SeamConversationWizardPage1() {
- super("seam.new.conversation.page1",SeamUIMessages.SEAM_CONVERSATION_WIZARD_PAGE1_SEAM_CONVERSATION,null);
+ private final IStructuredSelection initialSelection;
+
+ public SeamConversationWizardPage1(IStructuredSelection initialSelection) {
+ super("seam.new.conversation.page1",SeamUIMessages.SEAM_CONVERSATION_WIZARD_PAGE1_SEAM_CONVERSATION,null, initialSelection);
+ this.initialSelection = initialSelection;
setMessage(getDefaultMessageText());
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamEntityWizard.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamEntityWizard.java 2007-10-21 14:17:16 UTC (rev 4400)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamEntityWizard.java 2007-10-21 15:57:17 UTC (rev 4401)
@@ -33,9 +33,13 @@
super(CREATE_SEAM_ENTITY);
setWindowTitle(SeamUIMessages.SEAM_ENTITY_WIZARD_NEW_SEAM_ENTITY);
setDefaultPageImageDescriptor(ImageDescriptor.createFromFile(SeamEntityWizard.class, "SeamWebProjectWizBan.png"));
- addPage(new SeamEntityWizardPage1());
+
}
+ @Override
+ public void addPages() {
+ addPage(new SeamEntityWizardPage1(getInitialSelection()));
+ }
// TODO move operations to core plugin
public static final IUndoableOperation CREATE_SEAM_ENTITY = new SeamEntityCreateOperation();
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamEntityWizardPage1.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamEntityWizardPage1.java 2007-10-21 14:17:16 UTC (rev 4400)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamEntityWizardPage1.java 2007-10-21 15:57:17 UTC (rev 4401)
@@ -16,6 +16,7 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
+import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.widgets.Composite;
import org.jboss.tools.seam.ui.SeamUIMessages;
@@ -29,10 +30,11 @@
public class SeamEntityWizardPage1 extends SeamBaseWizardPage {
/**
+ * @param is
*
*/
- public SeamEntityWizardPage1() {
- super("seam.new.entity.page1","Seam Entity", null);
+ public SeamEntityWizardPage1(IStructuredSelection is) {
+ super("seam.new.entity.page1","Seam Entity", null, is);
setMessage(getDefaultMessageText());
}
@@ -41,7 +43,7 @@
*/
@Override
protected void createEditors() {
- addEditor(SeamWizardFactory.createSeamProjectSelectionFieldEditor(SeamWizardUtils.getSelectedProjectName()));
+ super.createEditors();
addEditor(SeamWizardFactory.createSeamEntityClasNameFieldEditor());
addEditor(SeamWizardFactory.createSeamMasterPageNameFieldEditor());
addEditor(SeamWizardFactory.createSeamPageNameFieldEditor());
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamFormWizard.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamFormWizard.java 2007-10-21 14:17:16 UTC (rev 4400)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamFormWizard.java 2007-10-21 15:57:17 UTC (rev 4401)
@@ -35,8 +35,13 @@
super(CREATE_SEAM_FORM);
setWindowTitle(SeamUIMessages.SEAM_FORM_WIZARD_NEW_SEAM_FORM);
setDefaultPageImageDescriptor(ImageDescriptor.createFromFile(SeamActionWizard.class, "SeamFormWizBan.png")); //$NON-NLS-1$
- addPage(new SeamFormWizardPage1());
+
}
+
+ @Override
+ public void addPages() {
+ addPage(new SeamFormWizardPage1(getInitialSelection()));
+ }
private static IUndoableOperation CREATE_SEAM_FORM = new SeamFormCreateOperation();
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamFormWizardPage1.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamFormWizardPage1.java 2007-10-21 14:17:16 UTC (rev 4400)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamFormWizardPage1.java 2007-10-21 15:57:17 UTC (rev 4401)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.seam.ui.wizard;
+import org.eclipse.jface.viewers.IStructuredSelection;
import org.jboss.tools.seam.ui.SeamUIMessages;
@@ -20,17 +21,14 @@
public class SeamFormWizardPage1 extends SeamBaseWizardPage {
/**
+ * @param is
* @param pageName
*/
- public SeamFormWizardPage1() {
- super("seam.new.form.page1",SeamUIMessages.SEAM_FORM_WIZARD_PAGE1_SEAM_FORM,null); //$NON-NLS-1$
+ public SeamFormWizardPage1(IStructuredSelection is) {
+ super("seam.new.form.page1",SeamUIMessages.SEAM_FORM_WIZARD_PAGE1_SEAM_FORM,null, is); //$NON-NLS-1$
setMessage(getDefaultMessageText());
}
-
- @Override
- protected void createEditors() {
- addEditors(SeamWizardFactory.createBaseFormFieldEditors(SeamWizardUtils.getSelectedProjectName()));
- }
+
/* (non-Javadoc)
* @see org.jboss.tools.seam.ui.wizard.SeamBaseWizardPage#getDefaultMessageText()
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizardPage.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizardPage.java 2007-10-21 14:17:16 UTC (rev 4400)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizardPage.java 2007-10-21 15:57:17 UTC (rev 4401)
@@ -49,7 +49,7 @@
*/
public void createControl(Composite parent) {
setPageComplete(true);
- String projectName = SeamWizardUtils.getSelectedProjectName();
+ String projectName = SeamWizardUtils.getCurrentSelectedRootSeamProjectName();
projectEditor = SeamWizardFactory.createSeamProjectSelectionFieldEditor(projectName);
projectEditor.addPropertyChangeListener(this);
if(projectName!=null && projectName.length()>0) {
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamWizardFactory.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamWizardFactory.java 2007-10-21 14:17:16 UTC (rev 4400)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamWizardFactory.java 2007-10-21 15:57:17 UTC (rev 4401)
@@ -76,7 +76,7 @@
public static final IFieldEditor[] createBaseFormFieldEditors(String defaultSelection) {
return new IFieldEditor[]{
- SeamWizardFactory.createSeamProjectSelectionFieldEditor(SeamWizardUtils.getSelectedProjectName()),
+ SeamWizardFactory.createSeamProjectSelectionFieldEditor(defaultSelection),
SeamWizardFactory.createSeamComponentNameFieldEditor(),
SeamWizardFactory.createSeamLocalInterfaceNameFieldEditor(),
SeamWizardFactory.createSeamBeanNameFieldEditor(),
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamWizardUtils.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamWizardUtils.java 2007-10-21 14:17:16 UTC (rev 4400)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamWizardUtils.java 2007-10-21 15:57:17 UTC (rev 4401)
@@ -12,32 +12,96 @@
package org.jboss.tools.seam.ui.wizard;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.internal.ui.viewsupport.IViewPartInputProvider;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
+import org.jboss.tools.seam.core.ISeamProject;
+import org.jboss.tools.seam.core.SeamCorePlugin;
/**
- * @author eskimo
- *
+ * @author eskimo,max
+ *
*/
public class SeamWizardUtils {
/**
- * @return
+ * @return current root seam project name based on the current selection;
+ * empty string if there is no seam project to be found
*/
- public static String getSelectedProjectName() {
- ISelection sel =
- PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService().getSelection();
- if(sel != null && sel instanceof IStructuredSelection) {
- IStructuredSelection structSel = (IStructuredSelection)sel;
- Object selElem = structSel.getFirstElement();
- if(selElem instanceof IAdaptable) {
- IProject project = (IProject)((IAdaptable)selElem).getAdapter(IProject.class);
- if(project!=null)return project.getName();
+ public static String getCurrentSelectedRootSeamProjectName() {
+ ISelection sel = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
+ .getSelectionService().getSelection();
+ return getRootSeamProjectName(sel);
+ }
+
+ public static String getRootSeamProjectName(ISelection sel) {
+ IProject project = getInitialProject(sel);
+ if (project != null) {
+ ISeamProject seamProject = SeamCorePlugin.getSeamProject(project,
+ false);
+ if (seamProject == null) {
+ return "";
}
+
+ String parentProjectName = seamProject.getParentProjectName();
+ if (parentProjectName == null) {
+ return project.getName();
+ } else {
+ return parentProjectName;
+ }
}
- return ""; //$NON-NLS-1$
+ return "";
}
+ static private IProject getInitialProject(ISelection simpleSelection) {
+
+ IProject project = null;
+ if (simpleSelection != null && !simpleSelection.isEmpty()
+ && simpleSelection instanceof IStructuredSelection) {
+ IStructuredSelection selection = (IStructuredSelection) simpleSelection;
+ Object selectedElement = selection.getFirstElement();
+ if (selectedElement instanceof IAdaptable) {
+ IAdaptable adaptable = (IAdaptable) selectedElement;
+
+ IResource resource = (IResource) adaptable
+ .getAdapter(IResource.class);
+ return resource.getProject();
+ }
+ }
+
+ if(project==null) {
+ IEditorPart activeEditor = getActivePage().getActiveEditor();
+ if(activeEditor!=null) {
+ IEditorInput input = activeEditor.getEditorInput();
+ if(input instanceof IFileEditorInput) {
+ IFileEditorInput fileInput = (IFileEditorInput) input;
+ return fileInput.getFile().getProject();
+ }
+ }
+ }
+ return project;
+ }
+
+ private static IWorkbenchPage getActivePage() {
+ IWorkbenchWindow window= getWorkbench().getActiveWorkbenchWindow();
+ if (window == null)
+ return null;
+ return getWorkbench().getActiveWorkbenchWindow().getActivePage();
+ }
+
+ private static IWorkbench getWorkbench() {
+ return PlatformUI.getWorkbench();
+ }
+
}
17 years, 2 months
JBoss Tools SVN: r4400 - in trunk/seam/plugins/org.jboss.tools.seam.core/templates: ear-seam2 and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2007-10-21 10:17:16 -0400 (Sun, 21 Oct 2007)
New Revision: 4400
Added:
trunk/seam/plugins/org.jboss.tools.seam.core/templates/ear-seam2/
trunk/seam/plugins/org.jboss.tools.seam.core/templates/ear-seam2/.project
trunk/seam/plugins/org.jboss.tools.seam.core/templates/ear-seam2/.settings/
trunk/seam/plugins/org.jboss.tools.seam.core/templates/ear-seam2/.settings/org.eclipse.wst.common.component
trunk/seam/plugins/org.jboss.tools.seam.core/templates/ear-seam2/.settings/org.eclipse.wst.common.project.facet.core.xml
trunk/seam/plugins/org.jboss.tools.seam.core/templates/ear-seam2/EarContent/
trunk/seam/plugins/org.jboss.tools.seam.core/templates/ear-seam2/EarContent/META-INF/
trunk/seam/plugins/org.jboss.tools.seam.core/templates/ear-seam2/EarContent/META-INF/application.xml
Log:
seam2 sepcific ear templates
Added: trunk/seam/plugins/org.jboss.tools.seam.core/templates/ear-seam2/.project
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/templates/ear-seam2/.project (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/templates/ear-seam2/.project 2007-10-21 14:17:16 UTC (rev 4400)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>@projectName@-ear</name>
+ <comment></comment>
+ <projects>
+ <project>@projectName@-ejb</project>
+ <project>@projectName@</project>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ </natures>
+</projectDescription>
Added: trunk/seam/plugins/org.jboss.tools.seam.core/templates/ear-seam2/.settings/org.eclipse.wst.common.component
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/templates/ear-seam2/.settings/org.eclipse.wst.common.component (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/templates/ear-seam2/.settings/org.eclipse.wst.common.component 2007-10-21 14:17:16 UTC (rev 4400)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+<wb-module deploy-name="@projectName@-ear">
+<wb-resource deploy-path="/" source-path="/EarContent"/>
+<dependent-module deploy-path="/" handle="module:/resource/@projectName@-ejb/@projectName@-ejb">
+<dependency-type>uses</dependency-type>
+</dependent-module>
+<dependent-module deploy-path="/" handle="module:/resource/@projectName@/@projectName@">
+<dependency-type>uses</dependency-type>
+</dependent-module>
+</wb-module>
+</project-modules>
Added: trunk/seam/plugins/org.jboss.tools.seam.core/templates/ear-seam2/.settings/org.eclipse.wst.common.project.facet.core.xml
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/templates/ear-seam2/.settings/org.eclipse.wst.common.project.facet.core.xml (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/templates/ear-seam2/.settings/org.eclipse.wst.common.project.facet.core.xml 2007-10-21 14:17:16 UTC (rev 4400)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <runtime name="@runtimeName@"/>
+ <fixed facet="jst.ear"/>
+ <installed facet="jst.ear" version="5.0"/>
+</faceted-project>
Added: trunk/seam/plugins/org.jboss.tools.seam.core/templates/ear-seam2/EarContent/META-INF/application.xml
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/templates/ear-seam2/EarContent/META-INF/application.xml (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/templates/ear-seam2/EarContent/META-INF/application.xml 2007-10-21 14:17:16 UTC (rev 4400)
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<application xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd"
+ version="5">
+
+ <display-name>@projectName@-ear</display-name>
+
+ <module>
+ <web>
+ <web-uri>@projectName@.war</web-uri>
+ <context-root>/@projectName@</context-root>
+ </web>
+ </module>
+
+ <module>
+ <ejb>@projectName(a)-ejb.jar</ejb>
+ </module>
+
+ <!-- Seam and EL -->
+ <module>
+ <java>jboss-seam.jar</java>
+ </module>
+ <module>
+ <java>jboss-el.jar</java>
+ </module>
+
+ <!-- jBPM -->
+ <module>
+ <java>jbpm-jpdl.jar</java>
+ </module>
+
+ <!-- Drools and dependencies -->
+ <module>
+ <java>drools-core.jar</java>
+ </module>
+ <module>
+ <java>drools-compiler.jar</java>
+ </module>
+ <module>
+ <java>antlr-runtime.jar</java>
+ </module>
+ <module>
+ <java>mvel14.jar</java>
+ </module>
+
+ <!-- richfaces -->
+ <module>
+ <java>richfaces-api.jar</java>
+ </module>
+
+
+</application>
17 years, 2 months
JBoss Tools SVN: r4399 - in trunk/seam: tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2007-10-21 10:09:37 -0400 (Sun, 21 Oct 2007)
New Revision: 4399
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/Seam2FacetInstallDelegateTest.java
Log:
http://jira.jboss.org/jira/browse/JBIDE-1107 Seam 2 support
test project has greenlight now, but waaay to many jars.
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java 2007-10-21 10:03:00 UTC (rev 4398)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java 2007-10-21 14:09:37 UTC (rev 4399)
@@ -16,8 +16,12 @@
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashSet;
import java.util.List;
import java.util.Properties;
+import java.util.Set;
import org.apache.tools.ant.types.FilterSet;
import org.apache.tools.ant.types.FilterSetCollection;
@@ -96,15 +100,24 @@
.include("mvel14.jar") //$NON-NLS-1$
.include("jboss-el.jar"); //$NON-NLS-1$
- public static AntCopyUtils.FileSet JBOSS_TEST_LIB_FILESET = new AntCopyUtils.FileSet()
+ // test/*.jar are duplicated here since the filtering seem to be assymetric when matching
+ public static AntCopyUtils.FileSet JBOSS_TEST_LIB_FILESET = new AntCopyUtils.FileSet()
+ .exclude("jboss-seam.*")
+ .exclude("jboss-aop\\.jar")
+ .exclude("jboss-container\\.jar")
+ .include(".*\\.jar") //$NON-NLS-1$ // TODO: fix this, since test shouldn't need them all ;(
.include("testng\\.jar") //$NON-NLS-1$
.include("test/jboss-deployers.jar") //$NON-NLS-1$
+ .include("jboss-deployers.jar") //$NON-NLS-1$
.include("test/jboss-embedded-all.jar") //$NON-NLS-1$
+ .include("jboss-embedded-all.jar") //$NON-NLS-1$
.include("myfaces-api-.*\\.jar") //$NON-NLS-1$
.include("myfaces-impl-.*\\.jar") //$NON-NLS-1$
.include("servlet-api\\.jar") //$NON-NLS-1$
.include("test/hibernate-all\\.jar") //$NON-NLS-1$
+ .include("hibernate-all\\.jar") //$NON-NLS-1$
.include("test/thirdparty-all\\.jar") //$NON-NLS-1$
+ .include("thirdparty-all\\.jar") //$NON-NLS-1$
//.include("el-api\\.jar") //$NON-NLS-1$
//.include("el-ri\\.jar") //$NON-NLS-1$
.exclude(".*/CVS") //$NON-NLS-1$
@@ -325,6 +338,9 @@
new File(project.getLocation().toFile(),source.getFullPath().lastSegment()+"/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);
+ // Needed to make sure /dev is picked up by test, so need seam.properties.
+ AntCopyUtils.copyFileToFolder(new File(seamGenResFolder,"seam.properties"), new File(project.getLocation().toFile(),source.getFullPath().lastSegment()+"/action"), true); //$NON-NLS-1$
+
AntCopyUtils.copyFileToFile(
persistenceFile,
new File(srcFolder,"META-INF/persistence.xml"), //$NON-NLS-1$
@@ -599,16 +615,20 @@
File[] firstlibs = includeLibs.getDir().listFiles(new AntCopyUtils.FileSetFileFilter(includeLibs));
File[] secondLibs = secondSetincludeLibs.getDir().listFiles(new AntCopyUtils.FileSetFileFilter(secondSetincludeLibs));
-
- StringBuffer testLibraries = new StringBuffer();
-
- for (File file : firstlibs) {
- testLibraries.append("\t<classpathentry kind=\"lib\" path=\"lib/" + file.getName() + "\"/>\n"); //$NON-NLS-1$ //$NON-NLS-2$
+ Set<String> allLibs = new HashSet<String>(); // HACK: needed to be unique because some jboss-*.jars are duplicated
+ for(File f : firstlibs) {
+ allLibs.add(f.getName());
}
- for (File file : secondLibs) {
- testLibraries.append("\t<classpathentry kind=\"lib\" path=\"lib/" + file.getName() + "\"/>\n"); //$NON-NLS-1$ //$NON-NLS-2$
+ for(File f : secondLibs) {
+ allLibs.add(f.getName());
}
+
+ StringBuffer testLibraries = new StringBuffer();
+ for (String file : allLibs) {
+ testLibraries.append("\t<classpathentry kind=\"lib\" path=\"lib/" + file + "\"/>\n"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
StringBuffer requiredProjects = new StringBuffer();
requiredProjects.append(
"\t<classpathentry combineaccessrules=\"false\" kind=\"src\" path=\"/" + seamWebProject.getName() + "\"/>"); //$NON-NLS-1$ //$NON-NLS-2$
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/Seam2FacetInstallDelegateTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/Seam2FacetInstallDelegateTest.java 2007-10-21 10:03:00 UTC (rev 4398)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/Seam2FacetInstallDelegateTest.java 2007-10-21 14:09:37 UTC (rev 4399)
@@ -13,6 +13,7 @@
import java.io.File;
import java.io.IOException;
+import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
@@ -130,6 +131,20 @@
}
+
+ public void testSeamProperties() {
+ SeamProjectsSet warPs = new SeamProjectsSet(warProject.getProject());
+
+ IProject warProject = warPs.getWarProject();
+ assertTrue(warProject.exists());
+
+ assertNotNull(warProject.findMember("src/model/seam.properties"));
+ IResource findMember = warProject.findMember("src/action/seam.properties");
+ assertNotNull(findMember);
+ assertTrue(findMember instanceof IFile);
+
+ }
+
public void testJbpmPresent() throws CoreException, IOException {
SeamProjectsSet earPs = new SeamProjectsSet(earProject.getProject());
17 years, 2 months
JBoss Tools SVN: r4398 - in trunk/seam: plugins/org.jboss.tools.seam.core/templates and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2007-10-21 06:03:00 -0400 (Sun, 21 Oct 2007)
New Revision: 4398
Added:
trunk/seam/plugins/org.jboss.tools.seam.core/templates/test-seam2/
trunk/seam/plugins/org.jboss.tools.seam.core/templates/test-seam2/.classpath
trunk/seam/plugins/org.jboss.tools.seam.core/templates/test-seam2/.project
trunk/seam/plugins/org.jboss.tools.seam.core/templates/test-seam2/.settings/
trunk/seam/plugins/org.jboss.tools.seam.core/templates/test-seam2/.settings/org.jboss.tools.seam.core.prefs
trunk/seam/plugins/org.jboss.tools.seam.core/templates/test-seam2/bootstrap/
trunk/seam/plugins/org.jboss.tools.seam.core/templates/test-seam2/lib/
trunk/seam/plugins/org.jboss.tools.seam.core/templates/test-seam2/test-src/
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/Seam2FacetInstallDelegateTest.java
Log:
http://jira.jboss.org/jira/browse/JBIDE-1107 Seam 2 support
better test project, but still no greenlight
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java 2007-10-21 06:34:40 UTC (rev 4397)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java 2007-10-21 10:03:00 UTC (rev 4398)
@@ -97,15 +97,16 @@
.include("jboss-el.jar"); //$NON-NLS-1$
public static AntCopyUtils.FileSet JBOSS_TEST_LIB_FILESET = new AntCopyUtils.FileSet()
- .include("testng-.*-jdk15\\.jar") //$NON-NLS-1$
+ .include("testng\\.jar") //$NON-NLS-1$
+ .include("test/jboss-deployers.jar") //$NON-NLS-1$
+ .include("test/jboss-embedded-all.jar") //$NON-NLS-1$
.include("myfaces-api-.*\\.jar") //$NON-NLS-1$
.include("myfaces-impl-.*\\.jar") //$NON-NLS-1$
.include("servlet-api\\.jar") //$NON-NLS-1$
- .include("hibernate-all\\.jar") //$NON-NLS-1$
- .include("jboss-ejb3-all\\.jar") //$NON-NLS-1$
- .include("thirdparty-all\\.jar") //$NON-NLS-1$
- .include("el-api\\.jar") //$NON-NLS-1$
- .include("el-ri\\.jar") //$NON-NLS-1$
+ .include("test/hibernate-all\\.jar") //$NON-NLS-1$
+ .include("test/thirdparty-all\\.jar") //$NON-NLS-1$
+ //.include("el-api\\.jar") //$NON-NLS-1$
+ //.include("el-ri\\.jar") //$NON-NLS-1$
.exclude(".*/CVS") //$NON-NLS-1$
.exclude(".*/\\.svn"); //$NON-NLS-1$
@@ -136,8 +137,8 @@
.include("security\\.drl"); //$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$
+ .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$
@@ -180,10 +181,7 @@
.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 = "lib"; //$NON-NLS-1$
public static String SEAM_LIB_RELATED_PATH = "lib"; //$NON-NLS-1$
@@ -581,24 +579,35 @@
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 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().getLocation().lastSegment()); //$NON-NLS-1$
-
+ // TODO: why are these filters not shared!?
+ filterSet.addConfiguredFilterSet(SeamFacetFilterSetFactory.createHibernateDialectFilterSet(model));
+
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$
- File[] libs = includeLibs.getDir().listFiles(new AntCopyUtils.FileSetFileFilter(includeLibs));
+ AntCopyUtils.FileSet secondSetincludeLibs
+ = new AntCopyUtils.FileSet(JBOSS_TEST_LIB_FILESET)
+ .dir(new File(seamRuntime.getHomeDir(),"lib/test")); //$NON-NLS-1$
+
+ File[] firstlibs = includeLibs.getDir().listFiles(new AntCopyUtils.FileSetFileFilter(includeLibs));
+ File[] secondLibs = secondSetincludeLibs.getDir().listFiles(new AntCopyUtils.FileSetFileFilter(secondSetincludeLibs));
+
StringBuffer testLibraries = new StringBuffer();
- for (File file : libs) {
+ for (File file : firstlibs) {
testLibraries.append("\t<classpathentry kind=\"lib\" path=\"lib/" + file.getName() + "\"/>\n"); //$NON-NLS-1$ //$NON-NLS-2$
}
+ for (File file : secondLibs) {
+ testLibraries.append("\t<classpathentry kind=\"lib\" path=\"lib/" + file.getName() + "\"/>\n"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
StringBuffer requiredProjects = new StringBuffer();
requiredProjects.append(
@@ -611,7 +620,7 @@
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-seam2"); //$NON-NLS-1$
} catch (IOException e) {
SeamCorePlugin.getPluginLog().logError(e);
return;
@@ -636,27 +645,32 @@
new File(testProjectDir,"test-src/META-INF/persistence.xml"), //$NON-NLS-1$
new FilterSetCollection(filterSet), true);
- AntCopyUtils.copyFileToFolder(
+ /*AntCopyUtils.copyFileToFolder(
jbossBeansFile,
new File(testProjectDir,"test-src/META-INF"), //$NON-NLS-1$
- new FilterSetCollection(filterSet), true);
+ new FilterSetCollection(filterSet), true);*/
AntCopyUtils.copyFiles(
new File(seamRuntime.getHomeDir(),"lib"), //$NON-NLS-1$
testLibDir,
new AntCopyUtils.FileSetFileFilter(includeLibs));
+ //seam2 has a lib/test
+ AntCopyUtils.copyFiles(
+ new File(seamRuntime.getHomeDir(),"lib/test"), //$NON-NLS-1$
+ testLibDir,
+ new AntCopyUtils.FileSetFileFilter(includeLibs));
- createComponentsProperties(testSrcDir, "", Boolean.TRUE); //$NON-NLS-1$
+ createComponentsProperties(testSrcDir, "", true); //$NON-NLS-1$
}
/**
* @param seamGenResFolder
*/
- private void createComponentsProperties(final File seamGenResFolder, String projectName, Boolean 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$
- components.put("embeddedEjb", embedded.toString()); //$NON-NLS-1$
- components.put("jndiPattern", prefix+"#{ejbName}/local"); //$NON-NLS-1$ //$NON-NLS-2$
+ components.setProperty("embeddedEjb", ""+embedded); //$NON-NLS-1$
+ components.setProperty("jndiPattern", prefix+"#{ejbName}/local"); //$NON-NLS-1$ //$NON-NLS-2$
File componentsProps = new File(seamGenResFolder,"components.properties"); //$NON-NLS-1$
try {
componentsProps.createNewFile();
Added: trunk/seam/plugins/org.jboss.tools.seam.core/templates/test-seam2/.classpath
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/templates/test-seam2/.classpath (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/templates/test-seam2/.classpath 2007-10-21 10:03:00 UTC (rev 4398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="test-src"/>
+ <classpathentry kind="lib" path="bootstrap"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+@testLibraries@<classpathentry kind="lib" path="/@projectName@/@webRootFolder@"/>
+@requiredProjects@
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Added: trunk/seam/plugins/org.jboss.tools.seam.core/templates/test-seam2/.project
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/templates/test-seam2/.project (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/templates/test-seam2/.project 2007-10-21 10:03:00 UTC (rev 4398)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>@projectName@-test</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.jboss.ide.eclipse.archives.core.archivesBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.jboss.tools.seam.core.seambuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.jboss.ide.eclipse.archives.core.archivesNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.jboss.tools.seam.core.seamnature</nature>
+ </natures>
+</projectDescription>
Added: trunk/seam/plugins/org.jboss.tools.seam.core/templates/test-seam2/.settings/org.jboss.tools.seam.core.prefs
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/templates/test-seam2/.settings/org.jboss.tools.seam.core.prefs (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/templates/test-seam2/.settings/org.jboss.tools.seam.core.prefs 2007-10-21 10:03:00 UTC (rev 4398)
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+seam.parent.project=@projectName@
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java 2007-10-21 06:34:40 UTC (rev 4397)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java 2007-10-21 10:03:00 UTC (rev 4398)
@@ -79,8 +79,10 @@
Exception last = null;
for (IResource r : this.resourcesToCleanup) {
try {
+ System.out.println("Deleting " + r);
r.delete(true, null);
} catch(Exception e) {
+ System.out.println("Error deleting " + r);
e.printStackTrace();
last = e;
}
@@ -154,10 +156,10 @@
assertNotNull(proj);
assertTrue(proj.exists());
- /*assertTrue(proj.getWorkspace().getRoot().getProject(proj.getName() + "-test").exists());
+ assertTrue(proj.getWorkspace().getRoot().getProject(proj.getName() + "-test").exists());
IProject testProject = proj.getWorkspace().getRoot().getProject(proj.getName() + "-test");
- this.resourcesToCleanup.add(testProject);*/
- this.resourcesToCleanup.add(proj);
+ this.addResourceToCleanup(testProject);
+ this.addResourceToCleanup(proj);
return fproj;
}
@@ -168,17 +170,17 @@
final IProject proj = fproj.getProject();
assertNotNull(proj);
- //IProject testProject = proj.getWorkspace().getRoot().getProject(proj.getName() + "-test");
+ IProject testProject = proj.getWorkspace().getRoot().getProject(proj.getName() + "-test");
IProject ejbProject = proj.getWorkspace().getRoot().getProject(proj.getName() + "-ejb");
IProject earProject = proj.getWorkspace().getRoot().getProject(proj.getName() + "-ear");
this.resourcesToCleanup.add(proj);
- //this.resourcesToCleanup.add(testProject);
+ this.resourcesToCleanup.add(testProject);
this.resourcesToCleanup.add(ejbProject);
this.resourcesToCleanup.add(earProject);
assertTrue(proj.exists());
- //assertTrue(testProject.exists());
+ assertTrue(testProject.exists());
assertTrue(ejbProject.exists());
assertTrue(earProject.exists());
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/Seam2FacetInstallDelegateTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/Seam2FacetInstallDelegateTest.java 2007-10-21 06:34:40 UTC (rev 4397)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/Seam2FacetInstallDelegateTest.java 2007-10-21 10:03:00 UTC (rev 4398)
@@ -110,8 +110,26 @@
assertNotNull(testProject.findMember("bootstrap"));
assertNotNull(testProject.findMember("bootstrap/data"));
+ assertNull("embedded-ejb should not be installed for seam2", testProject.findMember("embedded-ejb"));
+
}
+ public void testTestLibs() throws CoreException, IOException {
+
+ SeamProjectsSet warPs = new SeamProjectsSet(warProject.getProject());
+
+ IProject testProject = warPs.getTestProject();
+ assertTrue(testProject.exists());
+
+ assertNotNull(testProject.findMember("lib/testng.jar"));
+ assertNotNull(testProject.findMember("lib/hibernate-all.jar"));
+ assertNotNull(testProject.findMember("lib/jboss-deployers.jar"));
+ assertNotNull(testProject.findMember("lib/jboss-embedded-all.jar"));
+ assertNotNull(testProject.findMember("lib/thirdparty-all.jar"));
+
+
+
+ }
public void testJbpmPresent() throws CoreException, IOException {
SeamProjectsSet earPs = new SeamProjectsSet(earProject.getProject());
17 years, 2 months
JBoss Tools SVN: r4397 - trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2007-10-21 02:34:40 -0400 (Sun, 21 Oct 2007)
New Revision: 4397
Added:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/Seam2FacetInstallDelegateTest.java
Log:
http://jira.jboss.org/jira/browse/JBIDE-1107 Seam 2 support
+Seam 2 facet
+Seam 2 installdelegate (copy of Seam 1 installdelegate to avoid "hurting" seam 1 functionallity)
+Allow users to have a seam 2 runtime
+Fixed a couple of spellingerrors
-Generated Test project is not 100% yet
-There is no filtering of Seam version in the wizard page
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/Seam2FacetInstallDelegateTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/Seam2FacetInstallDelegateTest.java (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/Seam2FacetInstallDelegateTest.java 2007-10-21 06:34:40 UTC (rev 4397)
@@ -0,0 +1,148 @@
+/*******************************************************************************
+ * 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.seam.core.test.project.facet;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.eclipse.wst.common.project.facet.core.IFacetedProject;
+import org.eclipse.wst.common.project.facet.core.IProjectFacet;
+import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
+import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
+import org.jboss.tools.seam.core.SeamProjectsSet;
+import org.jboss.tools.seam.core.project.facet.SeamRuntimeManager;
+import org.jboss.tools.seam.core.project.facet.SeamVersion;
+import org.jboss.tools.seam.internal.core.SeamProject;
+import org.jboss.tools.seam.internal.core.project.facet.ISeamFacetDataModelProperties;
+
+public class Seam2FacetInstallDelegateTest extends AbstractSeamFacetTest {
+
+ protected static final String SEAM_2_0_0 = "Seam 2.0.0";
+ IFacetedProject warProject;
+ IFacetedProject earProject;
+
+
+
+ private IProjectFacet seam2Facet;
+ private IProjectFacetVersion seam2FacetVersion;
+
+ public Seam2FacetInstallDelegateTest(String name) {
+ super(name);
+ }
+
+
+ @Override
+ protected void setUp() throws Exception {
+
+ seam2Facet = ProjectFacetsManager.getProjectFacet("jst.seam");
+ seam2FacetVersion = seam2Facet.getVersion("2.0");
+
+ File folder = new File(System.getProperty("jbosstools.test.seam.2.0.0.home", "/home/max/work/products/jboss-seam-2.0.0.CR2"));
+
+ SeamRuntimeManager.getInstance().addRuntime(SEAM_2_0_0, folder.getAbsolutePath(), SeamVersion.SEAM_2_0, true);
+ SeamRuntimeManager.getInstance().findRuntimeByName(SEAM_2_0_0);
+
+ warProject = createSeamWarProject("warprj");
+ earProject = createSeamEarProject("earprj");
+
+ warProject.getProject().getWorkspace().getRoot().refreshLocal(IResource.DEPTH_INFINITE, null);
+
+
+
+ super.setUp();
+ }
+
+ @Override
+ protected IDataModel createSeamDataModel(String deployType) {
+
+ IDataModel dataModel = super.createSeamDataModel(deployType);
+ dataModel.setStringProperty(ISeamFacetDataModelProperties.SEAM_RUNTIME_NAME, SEAM_2_0_0);
+
+ return dataModel;
+ }
+
+
+ public void testWarLibs() {
+
+
+ assertNotNull("could not find antlr-runtime.jar",warProject.getProject().findMember("WebContent/WEB-INF/lib/antlr-runtime.jar"));
+ assertNotNull("could not find commons-beanutils.jar",warProject.getProject().findMember("WebContent/WEB-INF/lib/commons-beanutils.jar"));
+ assertNotNull("could not find commons-digester.jar",warProject.getProject().findMember("WebContent/WEB-INF/lib/commons-digester.jar"));
+ assertNotNull("could not find drools-compiler.jar",warProject.getProject().findMember("WebContent/WEB-INF/lib/drools-compiler.jar"));
+ assertNotNull("could not find drools-core.jar",warProject.getProject().findMember("WebContent/WEB-INF/lib/drools-core.jar"));
+ assertNotNull("could not find jboss-el.jar",warProject.getProject().findMember("WebContent/WEB-INF/lib/jboss-el.jar"));
+ assertNotNull("could not find jboss-seam-debug.jar",warProject.getProject().findMember("WebContent/WEB-INF/lib/jboss-seam-debug.jar"));
+ assertNotNull("could not find jboss-seam-ioc.jar",warProject.getProject().findMember("WebContent/WEB-INF/lib/jboss-seam-ioc.jar"));
+ assertNotNull("could not find jboss-seam.jar",warProject.getProject().findMember("WebContent/WEB-INF/lib/jboss-seam.jar"));
+ assertNotNull("could not find jboss-seam-mail.jar",warProject.getProject().findMember("WebContent/WEB-INF/lib/jboss-seam-mail.jar"));
+ assertNotNull("could not find jboss-seam-pdf.jar",warProject.getProject().findMember("WebContent/WEB-INF/lib/jboss-seam-pdf.jar"));
+ assertNotNull("could not find jboss-seam-remoting.jar",warProject.getProject().findMember("WebContent/WEB-INF/lib/jboss-seam-remoting.jar"));
+ assertNotNull("could not find jboss-seam-ui.jar",warProject.getProject().findMember("WebContent/WEB-INF/lib/jboss-seam-ui.jar"));
+ assertNotNull("could not find jbpm-jpdl.jar",warProject.getProject().findMember("WebContent/WEB-INF/lib/jbpm-jpdl.jar"));
+ assertNotNull("could not find jsf-facelets.jar",warProject.getProject().findMember("WebContent/WEB-INF/lib/jsf-facelets.jar"));
+ assertNotNull("could not find mvel14.jar",warProject.getProject().findMember("WebContent/WEB-INF/lib/mvel14.jar"));
+ assertNotNull("could not find richfaces-api.jar",warProject.getProject().findMember("WebContent/WEB-INF/lib/richfaces-api.jar"));
+ assertNotNull("could not find richfaces-impl.jar",warProject.getProject().findMember("WebContent/WEB-INF/lib/richfaces-impl.jar"));
+ assertNotNull("could not find richfaces-ui.jar",warProject.getProject().findMember("WebContent/WEB-INF/lib/richfaces-ui.jar"));
+
+ }
+
+ public void testBootstrapDirPresent() throws CoreException, IOException {
+
+ SeamProjectsSet warPs = new SeamProjectsSet(warProject.getProject());
+
+ IProject testProject = warPs.getTestProject();
+ assertTrue(testProject.exists());
+
+ assertNotNull(testProject.findMember("bootstrap"));
+ assertNotNull(testProject.findMember("bootstrap/data"));
+
+ }
+
+ public void testJbpmPresent() throws CoreException, IOException {
+
+ SeamProjectsSet earPs = new SeamProjectsSet(earProject.getProject());
+
+ IProject project = earPs.getEarProject();
+ assertTrue(project.exists());
+
+ assertNotNull(project.findMember("EarContent/jbpm-jpdl.jar"));
+
+ }
+
+ public void testDroolsPresent() throws CoreException, IOException {
+
+
+ IProject earRoot = earProject.getProject();
+ SeamProjectsSet seamProjectsSet = new SeamProjectsSet(earRoot);
+
+
+
+ IProject earProject = seamProjectsSet.getEarProject();
+ assertNotNull(earProject.findMember("EarContent/security.drl"));
+
+ }
+
+ public void testCreateEar() throws CoreException, IOException {
+
+
+ }
+
+ @Override
+ protected IProjectFacetVersion getSeamFacetVersion() {
+ return seam2FacetVersion;
+ }
+}
17 years, 2 months