JBoss Tools SVN: r3772 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-09-24 13:05:07 -0400 (Mon, 24 Sep 2007)
New Revision: 3772
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java
Log:
Change allowing children to be seen in view
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java 2007-09-24 15:16:53 UTC (rev 3771)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java 2007-09-24 17:05:07 UTC (rev 3772)
@@ -35,8 +35,10 @@
import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
+import org.eclipse.jst.server.core.IEnterpriseApplication;
import org.eclipse.jst.server.core.IWebModule;
import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.IModuleType;
import org.eclipse.wst.server.core.IRuntime;
import org.eclipse.wst.server.core.IServerWorkingCopy;
import org.eclipse.wst.server.core.ServerPort;
@@ -83,7 +85,29 @@
}
public IModule[] getChildModules(IModule[] module) {
- return null;
+ if (module[0] != null && module[0].getModuleType() != null) {
+ if (module.length == 1) {
+ IModuleType moduleType = module[0].getModuleType();
+ if (moduleType != null && "jst.ear".equals(moduleType.getId())) { //$NON-NLS-1$
+ IEnterpriseApplication enterpriseApplication = (IEnterpriseApplication) module[0]
+ .loadAdapter(IEnterpriseApplication.class, null);
+ if (enterpriseApplication != null) {
+ IModule[] earModules = enterpriseApplication.getModules();
+ if ( earModules != null) {
+ return earModules;
+ }
+ }
+ }
+ else if (moduleType != null && "jst.web".equals(moduleType.getId())) { //$NON-NLS-1$
+ IWebModule webModule = (IWebModule) module[0].loadAdapter(IWebModule.class, null);
+ if (webModule != null) {
+ IModule[] modules = webModule.getModules();
+ return modules;
+ }
+ }
+ }
+ }
+ return new IModule[0];
}
// As of now none of my modules are implementing the parent / child nonesense
17 years, 3 months
JBoss Tools SVN: r3771 - in trunk/seam/plugins/org.jboss.tools.seam.ui: src/org/jboss/tools/seam/ui/views and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-09-24 11:16:53 -0400 (Mon, 24 Sep 2007)
New Revision: 3771
Added:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/SeamReferencedFilter.java
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml
Log:
JBIDE-935
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml 2007-09-24 15:01:26 UTC (rev 3770)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml 2007-09-24 15:16:53 UTC (rev 3771)
@@ -144,6 +144,7 @@
<includes>
<contentExtension pattern="org.jboss.tools.seam.ui.views.rootContent" />
<contentExtension pattern="org.jboss.tools.seam.ui.views.SeamJarFilter"/>
+ <contentExtension pattern="org.jboss.tools.seam.ui.views.SeamReferencedFilter"/>
<contentExtension pattern="org.jboss.tools.seam.ui.views.SeamLinkHelper"/>
</includes>
</viewerContentBinding>
@@ -193,6 +194,13 @@
id="org.jboss.tools.seam.ui.views.SeamJarFilter"
name="Seam Components from Libraries"
activeByDefault="true"/>
+
+ <commonFilter
+ class="org.jboss.tools.seam.ui.views.SeamReferencedFilter"
+ description="Hide Seam Components loaded from referenced projects and not overriden in project"
+ id="org.jboss.tools.seam.ui.views.SeamReferencedFilter"
+ name="Seam Components from Referenced Projects"
+ activeByDefault="true"/>
</extension>
<extension point="org.eclipse.ui.navigator.viewer">
@@ -200,6 +208,7 @@
<includes>
<contentExtension pattern="org.jboss.tools.seam.ui.views.projectContent" />
<contentExtension pattern="org.jboss.tools.seam.ui.views.SeamJarFilter"/>
+ <contentExtension pattern="org.jboss.tools.seam.ui.views.SeamReferencedFilter"/>
</includes>
</viewerContentBinding>
</extension>
Added: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/SeamReferencedFilter.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/SeamReferencedFilter.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/SeamReferencedFilter.java 2007-09-24 15:16:53 UTC (rev 3771)
@@ -0,0 +1,50 @@
+/*******************************************************************************
+ * 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.ui.views;
+
+import java.util.Set;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.jboss.tools.seam.core.ISeamComponent;
+import org.jboss.tools.seam.core.ISeamComponentDeclaration;
+
+/**
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+public class SeamReferencedFilter extends ViewerFilter {
+
+ @Override
+ public boolean select(Viewer viewer, Object parentElement, Object element) {
+ if(element instanceof ISeamComponent) {
+ ISeamComponent component = (ISeamComponent)element;
+ Set<ISeamComponentDeclaration> ds = component.getAllDeclarations();
+ for (ISeamComponentDeclaration d : ds) {
+ IResource r = d.getResource();
+ if(r == null || !r.exists()) {
+ //do not filter out the component if we cannot be sure that
+ //its source is another project
+ return true;
+ }
+ if(r != null && r.getProject() == d.getSeamProject().getProject()) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ return true;
+ }
+
+}
17 years, 3 months
JBoss Tools SVN: r3770 - trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view.
by jbosstools-commits@lists.jboss.org
Author: mdryakhlenkov
Date: 2007-09-24 11:01:26 -0400 (Mon, 24 Sep 2007)
New Revision: 3770
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/plugin.xml
Log:
Action id are corrected.
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/plugin.xml
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/plugin.xml 2007-09-24 14:59:09 UTC (rev 3769)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/plugin.xml 2007-09-24 15:01:26 UTC (rev 3770)
@@ -5,18 +5,18 @@
<objectContribution id="diagramEditorAction" objectClass="org.hibernate.mapping.RootClass">
<menu id="org.jboss.tools.hibernate.ui.view.openDiagram" label="Open Mapping Diagram" path="diagramEditorAction"/>
<action
- id="com.xyz.runXYZ"
+ id="org.jboss.tools.hibernate.ui.view.openDiagramAction"
label="Open Mapping Diagram"
- icon="icons/runXYZ.gif"
+ icon="icons/runOpenDiagram.gif"
class="org.jboss.tools.hibernate.ui.view.views.OpenDiagramActionDelegate">
</action>
</objectContribution>
<objectContribution id="mappingEditorAction" objectClass="org.hibernate.mapping.RootClass">
<menu id="org.jboss.tools.hibernate.ui.view.openMapping" label="Open Mapping File" path="mappingEditorAction"/>
<action
- id="com.xyz.runXYZ"
+ id="org.jboss.tools.hibernate.ui.view.openMappingAction"
label="Open Mapping File"
- icon="icons/runXYZ.gif"
+ icon="icons/runOpenMapping.gif"
class="org.jboss.tools.hibernate.ui.view.views.OpenMappingActionDelegate">
</action>
</objectContribution>
17 years, 3 months
JBoss Tools SVN: r3769 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-09-24 10:59:09 -0400 (Mon, 24 Sep 2007)
New Revision: 3769
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/ModuleViewProvider.java
Log:
error on remove module for non-jbossas servers
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/ModuleViewProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/ModuleViewProvider.java 2007-09-24 14:53:24 UTC (rev 3768)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/ModuleViewProvider.java 2007-09-24 14:59:09 UTC (rev 3769)
@@ -75,12 +75,13 @@
Thread t = new Thread() { public void run() {
try {
IServerWorkingCopy server = selection.server.createWorkingCopy();
- IServer server2 = server.save(true, null);
if( ServerConverter.getDeployableServer(selection.server) != null ) {
ServerConverter.getDeployableServerBehavior(selection.server)
.publishOneModule(IServer.PUBLISH_FULL, selection.module, ServerBehaviourDelegate.REMOVED, new NullProgressMonitor());
} else {
+ ServerUtil.modifyModules(server, new IModule[0], selection.module, new NullProgressMonitor());
+ IServer server2 = server.save(true, null);
server2.publish(IServer.PUBLISH_INCREMENTAL, new NullProgressMonitor());
}
} catch (Exception e) {
17 years, 3 months
JBoss Tools SVN: r3768 - trunk/documentation/qa/emma/reports.
by jbosstools-commits@lists.jboss.org
Author: anis
Date: 2007-09-24 10:53:24 -0400 (Mon, 24 Sep 2007)
New Revision: 3768
Added:
trunk/documentation/qa/emma/reports/QAcoverage24092007.zip
Log:
Added a file remotely
Added: trunk/documentation/qa/emma/reports/QAcoverage24092007.zip
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/qa/emma/reports/QAcoverage24092007.zip
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
17 years, 3 months
JBoss Tools SVN: r3767 - trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/server.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-09-24 09:05:31 -0400 (Mon, 24 Sep 2007)
New Revision: 3767
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/server/ChangeTimeStampActionDelegate.java
Log:
JBIDE-929
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/server/ChangeTimeStampActionDelegate.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/server/ChangeTimeStampActionDelegate.java 2007-09-22 01:17:12 UTC (rev 3766)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/server/ChangeTimeStampActionDelegate.java 2007-09-24 13:05:31 UTC (rev 3767)
@@ -11,47 +11,26 @@
package org.jboss.tools.jst.web.ui.action.server;
import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jface.action.*;
import org.eclipse.jface.viewers.*;
import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
import org.eclipse.ui.*;
import org.eclipse.wst.common.componentcore.ComponentCore;
import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualFolder;
-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.ProjectFacetsManager;
-import org.eclipse.wst.common.project.facet.core.runtime.IRuntime;
-import org.jboss.tools.common.meta.action.*;
-import org.jboss.tools.common.model.*;
-import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.jst.web.messages.xpl.WebUIMessages;
-import org.jboss.tools.jst.web.model.helpers.WebAppHelper;
import org.jboss.tools.jst.web.ui.WebUiPlugin;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.NullProgressMonitor;
public class ChangeTimeStampActionDelegate implements IWorkbenchWindowActionDelegate {
- static Set<String> warFilesToTouch = new HashSet<String>();
- static Set<String> earFilesToTouch = new HashSet<String>();
- static {
- warFilesToTouch.add("web.xml");
- earFilesToTouch.add("manifest.mf");
- }
-
protected IWorkbenchWindow window;
String tooltip = null;
@@ -105,32 +84,33 @@
if(project == null || !project.isAccessible()) return fs;
boolean isWar = J2EEProjectUtilities.isDynamicWebProject(project);
boolean isEar = J2EEProjectUtilities.isEARProject(project);
- boolean isEJB = J2EEProjectUtilities.isEJBProject(project);
+ boolean isReferencedByEar = false;
if(!isEar) {
IProject[] ps = J2EEProjectUtilities.getReferencingEARProjects(project);
for (int i = 0; i < ps.length; i++) {
fs.addAll(getFilesToTouch(ps[i]));
+ isReferencedByEar = true;
}
}
if(isEar) {
- List l = J2EEProjectUtilities.getAllProjectFiles(project);
- for (int i = 0; i < l.size(); i++) {
- IFile f = (IFile)l.get(i);
- String n = f.getName().toLowerCase();
- if(earFilesToTouch.contains(n)) fs.add(f);
+ IVirtualComponent component = ComponentCore.createComponent(project);
+ IPath path = component.getRootFolder().getProjectRelativePath();
+ IFile f = project.getFile(path.append("META-INF").append("application.xml"));
+ if(f != null && f.exists()) {
+ fs.add(f);
}
}
- if(isWar) {
- List l = J2EEProjectUtilities.getAllProjectFiles(project);
- for (int i = 0; i < l.size(); i++) {
- IFile f = (IFile)l.get(i);
- String n = f.getName().toLowerCase();
- if(warFilesToTouch.contains(n)) fs.add(f);
+ if(isWar && !isReferencedByEar) {
+ IVirtualComponent component = ComponentCore.createComponent(project);
+ IPath path = component.getRootFolder().getProjectRelativePath();
+ IFile f = project.getFile(path.append("WEB-INF").append("web.xml"));
+ if(f != null && f.exists()) {
+ fs.add(f);
}
}
return fs;
- }
+ }
public void run(IAction action) {
try {
@@ -139,7 +119,7 @@
WebUiPlugin.getPluginLog().logError(e);
}
}
-
+
protected void doRun() throws Exception {
if(project == null || !project.isAccessible()) return;
List<IFile> fs = getFilesToTouch(project);
17 years, 3 months
JBoss Tools SVN: r3766 - trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-09-21 21:17:12 -0400 (Fri, 21 Sep 2007)
New Revision: 3766
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseOperation.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/SeamGenerateEnitiesWizard.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamProjectSelectionDialog.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamProjectWizard.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-906
test project is created for WAR and EAR seam deployment configurations
The bas sequence look like this for both deployment types:
1. Create Seam WEB Project
2. Create Action or Form
3. Open test-src folder in test project
4. Find test class or test xml file.
5. In context menu on navigator select Run AS/Test NG Test for test class Run As/Test NG test suite for xml
6. test NG should show Test NG View with green bar on top, that means all test passed
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseOperation.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseOperation.java 2007-09-22 01:17:08 UTC (rev 3765)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseOperation.java 2007-09-22 01:17:12 UTC (rev 3766)
@@ -68,7 +68,7 @@
params.get(IParameter.SEAM_PROJECT_NAME).getValueAsString());
Map<String, Object> vars = new HashMap<String, Object>();
- IEclipsePreferences seamFacetPrefs = SeamCorePlugin.getSeamFacetPreferences(project);
+ IEclipsePreferences seamFacetPrefs = SeamCorePlugin.getSeamPreferences(project);
try {
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-09-22 01:17:08 UTC (rev 3765)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseWizardPage.java 2007-09-22 01:17:12 UTC (rev 3766)
@@ -186,7 +186,7 @@
IResource project = getSelectedProject();
- String type = SeamCorePlugin.getSeamFacetPreferences(project.getProject()).get(ISeamFacetDataModelProperties.JBOSS_AS_DEPLOY_AS,"war");
+ String type = SeamCorePlugin.getSeamPreferences(project.getProject()).get(ISeamFacetDataModelProperties.JBOSS_AS_DEPLOY_AS,"war");
getEditor(IParameter.SEAM_BEAN_NAME).setEnabled(!isWar());
@@ -268,7 +268,7 @@
public boolean isWar() {
if(getSelectedProject()==null ||
- SeamCorePlugin.getSeamFacetPreferences(getSelectedProject().getProject())==null) return true;
- return "war".equals(SeamCorePlugin.getSeamFacetPreferences(getSelectedProject().getProject()).get(ISeamFacetDataModelProperties.JBOSS_AS_DEPLOY_AS,"war"));
+ SeamCorePlugin.getSeamPreferences(getSelectedProject().getProject())==null) return true;
+ return "war".equals(SeamCorePlugin.getSeamPreferences(getSelectedProject().getProject()).get(ISeamFacetDataModelProperties.JBOSS_AS_DEPLOY_AS,"war"));
}
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizard.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizard.java 2007-09-22 01:17:08 UTC (rev 3765)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizard.java 2007-09-22 01:17:12 UTC (rev 3766)
@@ -95,7 +95,7 @@
wc.setAttribute(HibernateLaunchConstants.ATTR_USE_OWN_TEMPLATES, true);
SeamRuntime seamRt = SeamRuntimeManager.getInstance().getDefaultRuntime();
- String runtimeName = SeamCorePlugin.getSeamFacetPreferences(project)
+ String runtimeName = SeamCorePlugin.getSeamPreferences(project)
.get(ISeamFacetDataModelProperties.SEAM_RUNTIME_NAME,"");
if(!"".equals(runtimeName)) {
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamProjectSelectionDialog.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamProjectSelectionDialog.java 2007-09-22 01:17:08 UTC (rev 3765)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamProjectSelectionDialog.java 2007-09-22 01:17:12 UTC (rev 3766)
@@ -24,6 +24,7 @@
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.dialogs.ListDialog;
import org.eclipse.ui.model.WorkbenchLabelProvider;
+import org.eclipse.wst.common.project.facet.core.IFacetedProject;
import org.jboss.tools.seam.core.SeamCorePlugin;
import org.jboss.tools.seam.core.project.facet.SeamFacetPreference;
import org.jboss.tools.seam.internal.core.SeamProject;
@@ -48,7 +49,9 @@
ArrayList<IProject> seamProjects = new ArrayList<IProject>();
for (IProject project : ResourcesPlugin.getWorkspace().getRoot().getProjects()) {
try {
- if(project.hasNature(SeamProject.NATURE_ID) && SeamCorePlugin.getSeamFacetPreferences(project)!=null) {
+ if(project.hasNature(SeamProject.NATURE_ID)
+ && SeamCorePlugin.getSeamPreferences(project)!=null
+ && project.getAdapter(IFacetedProject.class)!=null) {
seamProjects.add(project);
}
} catch (CoreException e) {
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamProjectWizard.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamProjectWizard.java 2007-09-22 01:17:08 UTC (rev 3765)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamProjectWizard.java 2007-09-22 01:17:12 UTC (rev 3766)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.seam.ui.wizard;
+import java.lang.reflect.InvocationTargetException;
import java.net.URL;
import org.eclipse.core.runtime.Platform;
@@ -84,8 +85,14 @@
}
return null;
}
-
-
+
+
+ @Override
+ protected String getFinalPerspectiveID() {
+ // TODO Auto-generated method stub
+ return "org.jboss.tools.seam.ui.SeamPerspective";
+ }
+
protected IFacetedProjectTemplate getTemplate() {
return ProjectFacetsManager.getTemplate("template.jst.seam"); //$NON-NLS-1$
}
17 years, 3 months
JBoss Tools SVN: r3765 - in trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam: internal/core/project/facet and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-09-21 21:17:08 -0400 (Fri, 21 Sep 2007)
New Revision: 3765
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCorePlugin.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegete.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetPostInstallDelegate.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-906
test project is created for WAR and EAR seam deployment configurations
The bas sequence look like this for both deployment types:
1. Create Seam WEB Project
2. Create Action or Form
3. Open test-src folder in test project
4. Find test class or test xml file.
5. In context menu on navigator select Run AS/Test NG Test for test class Run As/Test NG test suite for xml
6. test NG should show Test NG View with green bar on top, that means all test passed
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCorePlugin.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCorePlugin.java 2007-09-21 20:45:09 UTC (rev 3764)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCorePlugin.java 2007-09-22 01:17:08 UTC (rev 3765)
@@ -118,14 +118,8 @@
return null;
}
- public static IEclipsePreferences getSeamFacetPreferences(IProject project) {
- FacetedProject facetedProject = (FacetedProject) project.getAdapter(IFacetedProject.class);
- IProjectFacet facet = ProjectFacetsManager.getProjectFacet(ISeamCoreConstants.SEAM_CORE_FACET_ID);
- if(facetedProject.hasProjectFacet(facet)) {
- IScopeContext projectScope = new ProjectScope(project);
- return projectScope.getNode(PLUGIN_ID);
- }
-
- return null;
+ public static IEclipsePreferences getSeamPreferences(IProject project) {
+ IScopeContext projectScope = new ProjectScope(project);
+ return projectScope.getNode(PLUGIN_ID);
}
}
\ No newline at end of file
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegete.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegete.java 2007-09-21 20:45:09 UTC (rev 3764)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegete.java 2007-09-22 01:17:08 UTC (rev 3765)
@@ -57,6 +57,8 @@
public static String DEV_WAR_PROFILE = "dev-war";
public static String DEV_EAR_PROFILE = "dev";
+ public static String TEST_WAR_PROFILE = "test-war";
+ public static String TEST_EAR_PROFILE = "test";
public static AntCopyUtils.FileSet TOMCAT_WAR_LIB_FILESET = new AntCopyUtils.FileSet()
.include("activation\\.jar")
@@ -284,7 +286,7 @@
hibernateDialectFilterSet.addFilterSet(projectFilterSet);
hibernateDialectFilterSet.addFilterSet(SeamFacetFilterSetFactory.createHibernateDialectFilterSet(model));
- createComponentsProperties(srcFolder, project.getName(), Boolean.FALSE);
+ createComponentsProperties(srcFolder, isWarConfiguration(model)?"":project.getName()+"-ear", false);
createTestProject(model,project,selectedRuntime);
// ********************************************************************************************
@@ -312,6 +314,8 @@
// WtpUtils.createSourceFolder(project, new Path("src/test"),new Path("src"));
// WtpUtils.createSourceFolder(project, new Path("src/action"),new Path("src"));
// WtpUtils.createSourceFolder(project, new Path("src/model"),new Path("src"));
+
+
// Copy sources to src
AntCopyUtils.copyFileToFile(
@@ -567,14 +571,16 @@
File testLibDir = new File(testProjectDir,"lib");
File embededEjbDir = new File(testProjectDir,"embedded-ejb");
File testSrcDir = new File(testProjectDir,"test-src");
+ String seamGenResFolder = seamRuntime.getHomeDir()+"/seam-gen/resources";
+ File persistenceFile = new File(seamGenResFolder ,"META-INF/persistence-" + (isWarConfiguration(model)?TEST_WAR_PROFILE:TEST_EAR_PROFILE) + ".xml");
+ File jbossBeansFile = new File(seamGenResFolder ,"META-INF/jboss-beans.xml");
FilterSet filterSet = new FilterSet();
filterSet.addFilter("projectName", projectName);
filterSet.addFilter("runtimeName", WtpUtils.getServerRuntimeName(seamWebProject));
-
+
final SeamRuntime selectedRuntime = SeamRuntimeManager.getInstance().findRuntimeByName(model.getProperty(ISeamFacetDataModelProperties.SEAM_RUNTIME_NAME).toString());
final String seamHomePath = selectedRuntime.getHomeDir();
- final File seamGenResFolder = new File(selectedRuntime.getHomeDir());
AntCopyUtils.FileSet includeLibs
= new AntCopyUtils.FileSet(JBOSS_TEST_LIB_FILESET)
@@ -617,23 +623,32 @@
embededEjbDir,
new AntCopyUtils.FileSetFileFilter(excludeCvsSvn));
+ AntCopyUtils.copyFileToFile(
+ persistenceFile,
+ new File(testProjectDir,"test-src/META-INF/persistence.xml"),
+ new FilterSetCollection(filterSet), true);
+ AntCopyUtils.copyFileToFolder(
+ jbossBeansFile,
+ new File(testProjectDir,"test-src/META-INF"),
+ new FilterSetCollection(filterSet), true);
+
AntCopyUtils.copyFiles(
new File(seamRuntime.getHomeDir(),"lib"),
testLibDir,
new AntCopyUtils.FileSetFileFilter(includeLibs));
- createComponentsProperties(testSrcDir, seamWebProject.getName(), Boolean.TRUE);
-
+ createComponentsProperties(testSrcDir, "", Boolean.TRUE);
}
/**
* @param seamGenResFolder
*/
- private void createComponentsProperties(final File seamGenResFolder, String seamWebProjectName, Boolean embedded) {
+ private void createComponentsProperties(final File seamGenResFolder, String projectName, Boolean embedded) {
Properties components = new Properties();
+ String prefix = "".equals(projectName)?"":projectName+"/";
components.put("embeddedEjb", embedded.toString());
- components.put("jndiPattern", "/#{ejbName}/local");
+ components.put("jndiPattern", prefix+"#{ejbName}/local");
File componentsProps = new File(seamGenResFolder,"components.properties");
try {
componentsProps.createNewFile();
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetPostInstallDelegate.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetPostInstallDelegate.java 2007-09-21 20:45:09 UTC (rev 3764)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetPostInstallDelegate.java 2007-09-22 01:17:08 UTC (rev 3765)
@@ -47,7 +47,7 @@
*/
public void execute(final IProject project, IProjectFacetVersion fv,
Object config, IProgressMonitor monitor) throws CoreException {
- IEclipsePreferences prefs = SeamCorePlugin.getSeamFacetPreferences(project);
+ IEclipsePreferences prefs = SeamCorePlugin.getSeamPreferences(project);
final IDataModel model = (IDataModel)config;
prefs.put(JBOSS_AS_DEPLOY_AS, model.getProperty(JBOSS_AS_DEPLOY_AS).toString());
17 years, 3 months
JBoss Tools SVN: r3764 - in trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui: views and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-09-21 16:45:09 -0400 (Fri, 21 Sep 2007)
New Revision: 3764
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/ViewConstants.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/ComboFieldEditor.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/IFieldEditorFactory.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SwtFieldEditorFactory.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/TaggedComboFieldEditor.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/field/ComboBoxField.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-932
save of previously choosen values added and make combos vields uneditable, so you can only select values from dropdown list
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2007-09-21 17:57:31 UTC (rev 3763)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2007-09-21 20:45:09 UTC (rev 3764)
@@ -108,7 +108,7 @@
.createComboEditor(
ISeamFacetDataModelProperties.JBOSS_AS_DEPLOY_AS,
"Deploy as:", Arrays.asList(new String[] { "war", "ear" }),
- "war", false);
+ "war", true);
String lastCreatedCPName = "";
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/ViewConstants.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/ViewConstants.java 2007-09-21 17:57:31 UTC (rev 3763)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/ViewConstants.java 2007-09-21 20:45:09 UTC (rev 3764)
@@ -20,7 +20,7 @@
public String SCOPE_AS_LABEL = "label";
public String SCOPE_AS_NODE = "node";
- public String PACKAGES_FLAT = "flat";
+ public String PACKAGES_FLAT = "editable";
public String PACKAGES_HIERARCHICAL = "hierarchical";
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/ComboFieldEditor.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/ComboFieldEditor.java 2007-09-21 17:57:31 UTC (rev 3763)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/ComboFieldEditor.java 2007-09-21 20:45:09 UTC (rev 3764)
@@ -24,12 +24,12 @@
List values = null;
- boolean flat = false;
+ boolean editable = false;
- public ComboFieldEditor(String name, String label, List values,Object defaultValue,boolean flat) {
+ public ComboFieldEditor(String name, String label, List values,Object defaultValue,boolean editableSelection) {
super(name, label, defaultValue);
this.values = Collections.unmodifiableList(values);
- this.flat = flat;
+ this.editable = editableSelection;
}
private ComboBoxField comboField;
@@ -47,7 +47,7 @@
public Control getComboControl(Composite composite) {
// TODO Auto-generated method stub
if(comboField == null) {
- comboField = new ComboBoxField(composite,values,getValue(),flat);
+ comboField = new ComboBoxField(composite,values,getValue(),editable);
comboField.addPropertyChangeListener(this);
} else if(composite!=null) {
Assert.isTrue(comboField.getControl().getParent()==composite);
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/IFieldEditorFactory.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/IFieldEditorFactory.java 2007-09-21 17:57:31 UTC (rev 3763)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/IFieldEditorFactory.java 2007-09-21 20:45:09 UTC (rev 3764)
@@ -112,7 +112,7 @@
* @param label
* @param values
* @param defaultValue
- * @param flat
+ * @param editable
* @param action1
* @param action2
* @param validator
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SwtFieldEditorFactory.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SwtFieldEditorFactory.java 2007-09-21 17:57:31 UTC (rev 3763)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SwtFieldEditorFactory.java 2007-09-21 20:45:09 UTC (rev 3764)
@@ -170,7 +170,7 @@
}
};
}
-
+
/**
*
*/
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/TaggedComboFieldEditor.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/TaggedComboFieldEditor.java 2007-09-21 17:57:31 UTC (rev 3763)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/TaggedComboFieldEditor.java 2007-09-21 20:45:09 UTC (rev 3764)
@@ -28,13 +28,13 @@
ComboFieldEditor combo = null;
public TaggedComboFieldEditor(String name, String label, List values,
- Object defaultValue, boolean floatStyle) {
+ Object defaultValue, boolean editable) {
super(name, label, defaultValue==null?"":defaultValue.toString());
this.values = Collections.unmodifiableList(values);
- this.floatStyle = floatStyle;
+ this.floatStyle = editable;
combo = new ComboFieldEditor(
- name,label,values,getValue(),floatStyle);
+ name,label,values,getValue(),editable);
addFieldEditors(new IFieldEditor[]{new LabelFieldEditor(name,label),
combo});
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/field/ComboBoxField.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/field/ComboBoxField.java 2007-09-21 17:57:31 UTC (rev 3763)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/field/ComboBoxField.java 2007-09-21 20:45:09 UTC (rev 3764)
@@ -42,15 +42,16 @@
List values = new ArrayList();
public ComboBoxField(Composite parent,List values, ILabelProvider labelProvider,
- Object value, boolean floatStyle) {
- this(parent, values, value, floatStyle);
+ Object value, boolean flatStyle) {
+ this(parent, values, value, flatStyle);
comboControl.setLabelProvider(labelProvider);
}
- public ComboBoxField(Composite parent,List values, Object value, boolean floatStyle) {
+ public ComboBoxField(Composite parent,List values, Object value, boolean editable) {
this.values = values;
CCombo ccombo = new CCombo(parent, SWT.BORDER);
ccombo.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
+ ccombo.setEditable(editable);
comboControl = new ComboViewer(ccombo);
comboControl.setContentProvider(new IStructuredContentProvider() {
17 years, 3 months
JBoss Tools SVN: r3763 - trunk/seam/plugins/org.jboss.tools.seam.core/templates/test.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-09-21 13:57:31 -0400 (Fri, 21 Sep 2007)
New Revision: 3763
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/templates/test/.project
Log:
http://jira.jboss.org/jira/browse/JBIDE-936
Seam nature has been added to test project
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/templates/test/.project
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/templates/test/.project 2007-09-21 17:50:13 UTC (rev 3762)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/templates/test/.project 2007-09-21 17:57:31 UTC (rev 3763)
@@ -14,10 +14,16 @@
<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.eclipse.jdt.core.javanature</nature>
+ <nature>org.jboss.tools.seam.core.seamnature</nature>
</natures>
</projectDescription>
17 years, 3 months