JBoss Tools SVN: r3587 - trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-09-12 10:03:17 -0400 (Wed, 12 Sep 2007)
New Revision: 3587
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemsLoader.java
Log:
JBIDE-893
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemsLoader.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemsLoader.java 2007-09-12 14:01:22 UTC (rev 3586)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemsLoader.java 2007-09-12 14:03:17 UTC (rev 3587)
@@ -15,6 +15,7 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
import org.w3c.dom.*;
import org.jboss.tools.common.meta.XModelEntity;
import org.jboss.tools.common.model.*;
@@ -113,7 +114,7 @@
if(file != null) {
try {
file.refreshLocal(0, null);
- } catch (Exception e) {
+ } catch (CoreException e) {
// ignore
}
}
17 years, 4 months
JBoss Tools SVN: r3586 - trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-09-12 10:01:22 -0400 (Wed, 12 Sep 2007)
New Revision: 3586
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemsImpl.java
Log:
JBIDE-893
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemsImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemsImpl.java 2007-09-12 13:57:23 UTC (rev 3585)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemsImpl.java 2007-09-12 14:01:22 UTC (rev 3586)
@@ -60,8 +60,16 @@
class Ov implements XJob.XRunnable {
public void run() {
- try { Thread.sleep(200); } catch (Exception e) {}
- try { updateOverlappedInternal(); } catch (Exception e) {}
+ try {
+ Thread.sleep(200);
+ } catch (InterruptedException e) {
+ return;
+ }
+ try {
+ updateOverlappedInternal();
+ } catch (Exception e) {
+ ModelPlugin.getPluginLog().logError(e);
+ }
overlapper = null;
}
@@ -97,7 +105,7 @@
path = f.getCanonicalPath().replace('\\', '/').toLowerCase();
if (path.charAt(path.length()-1) != '/') path += '/';
paths[i] = path;
- } catch (Exception e) {
+ } catch (IOException e) {
paths[i] = null;
}
}
@@ -259,11 +267,14 @@
if(b) {
XModelObjectLoaderUtil.getObjectLoader(FileSystemsImpl.this).update(FileSystemsImpl.this);
}
- } catch (Exception e) {}
+ } catch (Exception e) {
+ ModelPlugin.getPluginLog().logError(e);
+ }
if(saveRequested) {
try {
XModelObjectLoaderUtil.getObjectLoader(FileSystemsImpl.this).save(FileSystemsImpl.this);
} catch (Exception e) {
+ ModelPlugin.getPluginLog().logError(e);
} finally {
saveRequested = false;
}
@@ -275,7 +286,8 @@
try {
IProject p = (IProject)getModel().getProperties().get("project");
return p != null && p.isOpen();
- } catch (Exception e){
+ } catch (Exception e) {
+ ModelPlugin.getPluginLog().logError(e);
return false;
}
}
17 years, 4 months
JBoss Tools SVN: r3585 - trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-09-12 09:57:23 -0400 (Wed, 12 Sep 2007)
New Revision: 3585
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemImpl.java
Log:
JBIDE-893
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemImpl.java 2007-09-12 13:53:06 UTC (rev 3584)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemImpl.java 2007-09-12 13:57:23 UTC (rev 3585)
@@ -11,6 +11,7 @@
package org.jboss.tools.common.model.filesystems.impl;
import java.io.File;
+import java.io.IOException;
import org.eclipse.core.resources.*;
import org.eclipse.core.runtime.*;
@@ -48,7 +49,7 @@
String thloc = XModelObjectUtil.getExpandedValue(this, "location", null);
try {
prloc = new File(prloc).getCanonicalPath().replace('\\','/');
- } catch (Exception e) {
+ } catch (IOException e) {
//ignore
}
try {
@@ -58,7 +59,7 @@
} else {
thloc = thloc.replace('\\', '/');
}
- } catch (Exception e) {
+ } catch (IOException e) {
return null;
}
if(thloc.equalsIgnoreCase(prloc)) return resource = project; ///
17 years, 4 months
JBoss Tools SVN: r3584 - trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/jst/web/tld.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-09-12 09:53:06 -0400 (Wed, 12 Sep 2007)
New Revision: 3584
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/jst/web/tld/FilePathEncoderFactory.java
Log:
JBIDE-893
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/jst/web/tld/FilePathEncoderFactory.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/jst/web/tld/FilePathEncoderFactory.java 2007-09-12 13:51:38 UTC (rev 3583)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/jst/web/tld/FilePathEncoderFactory.java 2007-09-12 13:53:06 UTC (rev 3584)
@@ -11,6 +11,7 @@
package org.jboss.tools.jst.web.tld;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
import org.jboss.tools.common.model.plugin.ModelPlugin;
import org.jboss.tools.common.model.util.ModelFeatureFactory;
@@ -29,8 +30,8 @@
if(project == null || !project.isOpen()) return null;
try {
if(project.hasNature("org.jboss.tools.jsf.jsfnature")) return jsfEncoder;
- } catch (Exception e) {
- //ignore
+ } catch (CoreException e) {
+ //ignore - all checks are done above
}
return null;
}
17 years, 4 months
JBoss Tools SVN: r3583 - trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-09-12 09:51:38 -0400 (Wed, 12 Sep 2007)
New Revision: 3583
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileAnyLongImpl.java
Log:
JBIDE-893
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileAnyLongImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileAnyLongImpl.java 2007-09-12 11:05:44 UTC (rev 3582)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileAnyLongImpl.java 2007-09-12 13:51:38 UTC (rev 3583)
@@ -14,7 +14,9 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.jboss.tools.common.model.plugin.ModelPlugin;
import org.jboss.tools.common.util.FileUtil;
public class FileAnyLongImpl extends FileAnyImpl {
@@ -35,8 +37,8 @@
if(ef != null) {
try {
ef.refreshLocal(IResource.DEPTH_ZERO, null);
- } catch (Exception e) {
- //ignore
+ } catch (CoreException e) {
+ ModelPlugin.getPluginLog().logError(e);
}
}
}
17 years, 4 months
JBoss Tools SVN: r3582 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/xml.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-09-12 07:05:44 -0400 (Wed, 12 Sep 2007)
New Revision: 3582
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/xml/PropertiesScanner.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/xml/XMLScanner.java
Log:
JBIDE-896
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/xml/PropertiesScanner.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/xml/PropertiesScanner.java 2007-09-12 10:12:48 UTC (rev 3581)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/xml/PropertiesScanner.java 2007-09-12 11:05:44 UTC (rev 3582)
@@ -14,9 +14,11 @@
import java.util.Map;
import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IPath;
import org.jboss.tools.common.model.XModel;
import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.filesystems.impl.FolderImpl;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.seam.internal.core.InnerModelHelper;
import org.jboss.tools.seam.internal.core.SeamPropertiesDeclaration;
@@ -68,6 +70,12 @@
public LoadedDeclarations parse(XModelObject o, IPath source) {
if(o == null) return null;
+
+ if(o.getParent() instanceof FolderImpl) {
+ IFile f = ResourcesPlugin.getWorkspace().getRoot().getFile(source);
+ if(f != null && f.exists()) ((FolderImpl)o.getParent()).updateChildFile(o, f.getLocation().toFile());
+ }
+
LoadedDeclarations ds = new LoadedDeclarations();
XModelObject[] properties = o.getChildren();
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-09-12 10:12:48 UTC (rev 3581)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/xml/XMLScanner.java 2007-09-12 11:05:44 UTC (rev 3582)
@@ -22,6 +22,7 @@
import org.jboss.tools.common.meta.XModelEntity;
import org.jboss.tools.common.model.XModel;
import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.filesystems.impl.FolderImpl;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.seam.core.ISeamXmlComponentDeclaration;
import org.jboss.tools.seam.internal.core.InnerModelHelper;
@@ -103,6 +104,12 @@
public LoadedDeclarations parse(XModelObject o, IPath source) {
if(o == null) return null;
+
+ if(o.getParent() instanceof FolderImpl) {
+ IFile f = ResourcesPlugin.getWorkspace().getRoot().getFile(source);
+ if(f != null && f.exists()) ((FolderImpl)o.getParent()).updateChildFile(o, f.getLocation().toFile());
+ }
+
LoadedDeclarations ds = new LoadedDeclarations();
if(o.getModelEntity().getName().equals("FileSeamComponent12")) {
parseComponent(o, source, ds);
17 years, 4 months
JBoss Tools SVN: r3581 - trunk/seam/plugins/org.jboss.tools.seam.core/templates/test.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-09-12 06:12:48 -0400 (Wed, 12 Sep 2007)
New Revision: 3581
Added:
trunk/seam/plugins/org.jboss.tools.seam.core/templates/test/.classpath
Log:
http://jira.jboss.org/jira/browse/JBIDE-825
Added: trunk/seam/plugins/org.jboss.tools.seam.core/templates/test/.classpath
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/templates/test/.classpath (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/templates/test/.classpath 2007-09-12 10:12:48 UTC (rev 3581)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="test-src"/>
+ <classpathentry kind="src" path="embedded-ejb"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/@projectName@"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/@projectName@-ejb"/>
+ @testLibraries@
+ <classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.generic.runtimeTarget/@runtimeName@"/>
+ <classpathentry kind="lib" path="/@projectName@/WebContent"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Property changes on: trunk/seam/plugins/org.jboss.tools.seam.core/templates/test/.classpath
___________________________________________________________________
Name: svn:mime-type
+ text/plain
17 years, 4 months
JBoss Tools SVN: r3580 - in trunk/seam/plugins/org.jboss.tools.seam.ui: src/org/jboss/tools/seam/ui/internal/project/facet and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-09-12 05:59:29 -0400 (Wed, 12 Sep 2007)
New Revision: 3580
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/build.properties
trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml
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/preferences/SeamPreferencePage.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
Log:
http://jira.jboss.org/jira/browse/JBIDE-825
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/build.properties
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/build.properties 2007-09-12 09:59:21 UTC (rev 3579)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/build.properties 2007-09-12 09:59:29 UTC (rev 3580)
@@ -5,10 +5,12 @@
META-INF/,\
.,\
icons/,\
- resources/
+ resources/,\
+ about.html
src.includes = resources/,\
plugin.xml,\
src/,\
icons/,\
build.properties,\
- META-INF/
+ META-INF/,\
+ about.html
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml 2007-09-12 09:59:21 UTC (rev 3579)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml 2007-09-12 09:59:29 UTC (rev 3580)
@@ -11,9 +11,11 @@
<wizard
category="org.jboss.tools.seam.ui"
class="org.jboss.tools.seam.ui.wizard.SeamProjectWizard"
+ finalPerspective="org.jboss.tools.seam.ui.SeamPerspective"
icon="icons/view/seam_project_new.gif"
id="org.jboss.tools.seam.ui.wizards.SeamProjectWizard"
name="Seam Web Project"
+ preferredPerspectives="org.jboss.tools.seam.ui.SeamPerspective"
project="true">
<description>
Create a Seam Web Project
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-12 09:59:21 UTC (rev 3579)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2007-09-12 09:59:29 UTC (rev 3580)
@@ -88,7 +88,7 @@
DataModelValidatorDelegate validatorDelegate;
IFieldEditor jBossSeamHomeEditor = IFieldEditorFactory.INSTANCE
- .createComboWithButton(ISeamFacetDataModelProperties.JBOSS_SEAM_HOME,
+ .createComboWithButton(ISeamFacetDataModelProperties.SEAM_RUNTIME_NAME,
"Seam Runtime", getRuntimeNames(), SeamRuntimeManager.getInstance().getDefaultRuntime().getName(), true, new NewSeamRuntimeAction(), (IValidator)null);
// IFieldEditor jBossSeamHomeEditor = IFieldEditorFactory.INSTANCE
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-09-12 09:59:21 UTC (rev 3579)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamPreferencePage.java 2007-09-12 09:59:29 UTC (rev 3580)
@@ -46,7 +46,7 @@
*
*/
SeamRuntimeListFieldEditor seamRuntimes
- = new SeamRuntimeListFieldEditor("rtlist","Runtime List",new ArrayList<SeamRuntime>(Arrays.asList(SeamRuntimeManager.getInstance().getRuntimes())));
+ = new SeamRuntimeListFieldEditor("rtlist","Seam Runtimes",new ArrayList<SeamRuntime>(Arrays.asList(SeamRuntimeManager.getInstance().getRuntimes())));
SeamRuntime initialDefault;
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-12 09:59:21 UTC (rev 3579)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizard.java 2007-09-12 09:59:29 UTC (rev 3580)
@@ -38,6 +38,9 @@
import org.hibernate.eclipse.launch.HibernateLaunchConstants;
import org.jboss.tools.seam.core.SeamCorePlugin;
import org.jboss.tools.seam.core.project.facet.SeamFacetPreference;
+import org.jboss.tools.seam.core.project.facet.SeamRuntime;
+import org.jboss.tools.seam.core.project.facet.SeamRuntimeManager;
+import org.jboss.tools.seam.internal.core.project.facet.ISeamFacetDataModelProperties;
import org.jboss.tools.seam.ui.SeamUIMessages;
/**
@@ -62,15 +65,21 @@
try {
ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
- ILaunchConfigurationType launchConfigurationType = launchManager.getLaunchConfigurationType("org.hibernate.eclipse.launch.CodeGenerationLaunchConfigurationType");
- ILaunchConfigurationWorkingCopy wc = launchConfigurationType.newInstance(null, "GenerateEntities");
+ ILaunchConfigurationType launchConfigurationType =
+ launchManager.getLaunchConfigurationType(
+ "org.hibernate.eclipse.launch.CodeGenerationLaunchConfigurationType");
+ ILaunchConfigurationWorkingCopy wc =
+ launchConfigurationType.newInstance(project, project.getName() + "generate-entities");
//Main
- wc.setAttribute(HibernateLaunchConstants.ATTR_CONSOLE_CONFIGURATION_NAME, params.get(IParameter.HIBERNATE_CONFIGURATION_NAME));
+ wc.setAttribute(
+ HibernateLaunchConstants.ATTR_CONSOLE_CONFIGURATION_NAME,
+ params.get(IParameter.HIBERNATE_CONFIGURATION_NAME));
IPath src = getSourceFolder(project);
if(src == null) {
- throw new CoreException(new Status(IStatus.ERROR, SeamCorePlugin.PLUGIN_ID, "Source folder not found in project " + project.getName()));
+ throw new CoreException(
+ new Status(IStatus.ERROR, SeamCorePlugin.PLUGIN_ID, "Source folder not found in project " + project.getName()));
}
wc.setAttribute(HibernateLaunchConstants.ATTR_OUTPUT_DIR, src.toString());
@@ -85,20 +94,27 @@
}
wc.setAttribute(HibernateLaunchConstants.ATTR_USE_OWN_TEMPLATES, true);
- String template = "" + SeamFacetPreference.getStringPreference(SeamFacetPreference.SEAM_HOME_FOLDER) + "/seam-gen/view";
-// wc.setAttribute(HibernateLaunchConstants.ATTR_ENABLE_TEMPLATE_DIR, true);
+ SeamRuntime seamRt = SeamRuntimeManager.getInstance().getDefaultRuntime();
+
+ String runtimeName = SeamCorePlugin.getSeamFacetPreferences(project)
+ .get(ISeamFacetDataModelProperties.SEAM_RUNTIME_NAME,"");
+
+ if(!"".equals(runtimeName)) {
+ seamRt = SeamRuntimeManager.getInstance().findRuntimeByName(runtimeName);
+ }
+
+ String template = "" + seamRt.getHomeDir() + "/seam-gen/view";
wc.setAttribute(HibernateLaunchConstants.ATTR_TEMPLATE_DIR, template);
- //Exporters
wc.setAttribute(HibernateLaunchConstants.ATTR_ENABLE_JDK5, true);
wc.setAttribute(HibernateLaunchConstants.ATTR_ENABLE_EJB3_ANNOTATIONS, true);
ExporterDefinition[] ds = ExtensionManager.findExporterDefinitions();
- if(ds != null) for (int i = 0; i < ds.length; i++) {
- wc.setAttribute(ds[i].getId(), true);
- }
+ wc.setAttribute("org.hibernate.tools.hbm2java", true);
- wc.launch("run", new NullProgressMonitor());
+ wc.doSave();
+ launchManager.addLaunch(wc.launch(ILaunchManager.RUN_MODE, monitor));
+
} catch (CoreException e) {
SeamCorePlugin.getPluginLog().logError(e);
}
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-12 09:59:21 UTC (rev 3579)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamProjectSelectionDialog.java 2007-09-12 09:59:29 UTC (rev 3580)
@@ -25,6 +25,7 @@
import org.eclipse.ui.dialogs.ListDialog;
import org.eclipse.ui.model.WorkbenchLabelProvider;
import org.jboss.tools.seam.core.SeamCorePlugin;
+import org.jboss.tools.seam.core.project.facet.SeamFacetPreference;
import org.jboss.tools.seam.internal.core.SeamProject;
/**
@@ -47,7 +48,7 @@
ArrayList<IProject> seamProjects = new ArrayList<IProject>();
for (IProject project : ResourcesPlugin.getWorkspace().getRoot().getProjects()) {
try {
- if(project.hasNature(SeamProject.NATURE_ID)) {
+ if(project.hasNature(SeamProject.NATURE_ID) && SeamCorePlugin.getSeamFacetPreferences(project)!=null) {
seamProjects.add(project);
}
} catch (CoreException e) {
17 years, 4 months
JBoss Tools SVN: r3579 - in trunk/seam/plugins/org.jboss.tools.seam.core: src/org/jboss/tools/seam/internal/core/project/facet and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-09-12 05:59:21 -0400 (Wed, 12 Sep 2007)
New Revision: 3579
Added:
trunk/seam/plugins/org.jboss.tools.seam.core/templates/test/
trunk/seam/plugins/org.jboss.tools.seam.core/templates/test/.project
trunk/seam/plugins/org.jboss.tools.seam.core/templates/test/embedded-ejb/
trunk/seam/plugins/org.jboss.tools.seam.core/templates/test/lib/
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/build.properties
trunk/seam/plugins/org.jboss.tools.seam.core/plugin.xml
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/AntCopyUtils.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/ISeamFacetDataModelProperties.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDataModelProvider.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/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.org/jira/browse/JBIDE-825
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/build.properties
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/build.properties 2007-09-12 09:59:14 UTC (rev 3578)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/build.properties 2007-09-12 09:59:21 UTC (rev 3579)
@@ -3,11 +3,13 @@
META-INF/,\
seam-core.jar,\
plugin.properties,\
- templates/
+ templates/,\
+ about.html
jars.compile.order = seam-core.jar
src.includes = templates/,\
src/,\
plugin.xml,\
plugin.properties,\
build.properties,\
- META-INF/
+ META-INF/,\
+ about.html
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/plugin.xml
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/plugin.xml 2007-09-12 09:59:14 UTC (rev 3578)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/plugin.xml 2007-09-12 09:59:21 UTC (rev 3579)
@@ -142,11 +142,11 @@
point="org.eclipse.wst.common.project.facet.core.runtimes">
<supported>
<runtime-component
- id="org.jboss.ide.eclipse.as.runtime.component.40"
+ id="org.jboss.ide.eclipse.as.runtime.component"
version="4.0">
</runtime-component>
<runtime-component
- id="org.jboss.ide.eclipse.as.runtime.component.42"
+ id="org.jboss.ide.eclipse.as.runtime.component"
version="4.2">
</runtime-component>
<facet
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/AntCopyUtils.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/AntCopyUtils.java 2007-09-12 09:59:14 UTC (rev 3578)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/AntCopyUtils.java 2007-09-12 09:59:21 UTC (rev 3579)
@@ -151,6 +151,9 @@
}
}
}
+ if(files.length==0 && !destinationFolder.exists()) {
+ destinationFolder.mkdir();
+ }
}
public static void copyFileToFolder(File source, File dest, boolean override) {
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/ISeamFacetDataModelProperties.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/ISeamFacetDataModelProperties.java 2007-09-12 09:59:14 UTC (rev 3578)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/ISeamFacetDataModelProperties.java 2007-09-12 09:59:21 UTC (rev 3579)
@@ -26,6 +26,8 @@
public static final String SEAM_CONNECTION_PROFILE = "seam.project.connection.profile";
+ public static final String SEAM_RUNTIME_NAME = "seam.runtime.name";
+
public static final String JBOSS_AS_HOME = "jboss.home";
public static final String JBOSS_AS_DEPLOY_AS = "seam.project.deployment.type";
@@ -68,4 +70,13 @@
public static final String WEB_CONTENTS_FOLDER = "seam.project.web.root.folder";
+ public static final String SEAM_EJB_PROJECT = "seam.ejb.project";
+
+ public static final String SEAM_TEST_PROJECT = "seam.test.project";
+
+ public static final String SEAM_EAR_PROJECT = "seam.ear.project";
+
+ public static final String DEPLOY_AS_WAR = "war";
+
+ public static final String DEPLOY_AS_EAR = "ear";
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDataModelProvider.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDataModelProvider.java 2007-09-12 09:59:14 UTC (rev 3578)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDataModelProvider.java 2007-09-12 09:59:21 UTC (rev 3579)
@@ -77,7 +77,10 @@
names.add(ISeamFacetDataModelProperties.WEB_CONTENTS_FOLDER);
names.add(ISeamFacetDataModelProperties.SEAM_PROJECT_NAME);
names.add(ISeamFacetDataModelProperties.SEAM_CONNECTION_PROFILE);
-
+ names.add(ISeamFacetDataModelProperties.SEAM_EAR_PROJECT);
+ names.add(ISeamFacetDataModelProperties.SEAM_EJB_PROJECT);
+ names.add(ISeamFacetDataModelProperties.SEAM_TEST_PROJECT);
+ names.add(ISeamFacetDataModelProperties.SEAM_RUNTIME_NAME);
return names;
}
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-12 09:59:14 UTC (rev 3578)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegete.java 2007-09-12 09:59:21 UTC (rev 3579)
@@ -209,7 +209,9 @@
final IVirtualFolder srcRootFolder = com.getRootFolder().getFolder(new Path("/WEB-INF/classes"));
IContainer folder = webRootFolder.getUnderlyingFolder();
edit.dispose();
+
model.setProperty(ISeamFacetDataModelProperties.SEAM_PROJECT_NAME, project.getName());
+ model.setProperty(ISeamFacetDataModelProperties.SEAM_TEST_PROJECT, project.getName()+"-test");
final File webContentFolder = folder.getLocation().toFile();
final File webInfFolder = new File(webContentFolder,"WEB-INF");
@@ -219,7 +221,7 @@
final File webLibFolder = new File(webContentFolder,WEB_LIBRARIES_RELATED_PATH);
final File srcFolder = srcRootFolder.getUnderlyingFolder().getLocation().toFile();
final File webMetaInf = new File(webContentFolder, "META-INF");
- final SeamRuntime selectedRuntime = SeamRuntimeManager.getInstance().findRuntimeByName(model.getProperty(ISeamFacetDataModelProperties.JBOSS_SEAM_HOME).toString());
+ final SeamRuntime selectedRuntime = SeamRuntimeManager.getInstance().findRuntimeByName(model.getProperty(ISeamFacetDataModelProperties.SEAM_RUNTIME_NAME).toString());
final String seamHomePath = selectedRuntime.getHomeDir();
@@ -303,9 +305,9 @@
// ********************************************************************************************
AntCopyUtils.copyFileToFolder(new File(seamGenResFolder,"seam.properties"), srcFolder, true);
- 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"));
+// 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(
new File(seamGenHomeFolder,"src/Authenticator.java"),
@@ -396,6 +398,8 @@
create.schedule();
} else {
+ model.setProperty(ISeamFacetDataModelProperties.SEAM_EJB_PROJECT, project.getName()+"-ejb");
+ model.setProperty(ISeamFacetDataModelProperties.SEAM_EAR_PROJECT, project.getName()+"-ear");
// In case of EAR configuration
AntCopyUtils.copyFiles(seamHomeFolder,webLibFolder,new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_WAR_LIB_FILESET_EAR_CONFIG).dir(seamHomeFolder)));
@@ -516,6 +520,11 @@
create.setRule(ResourcesPlugin.getWorkspace().getRoot());
create.schedule();
}
+ Job createTest = new CreateTestProject(model,project,selectedRuntime);
+ createTest.setUser(true);
+ createTest.setRule(ResourcesPlugin.getWorkspace().getRoot());
+ createTest.schedule();
+
ClasspathHelper.addClasspathEntries(project, fv);
EclipseResourceUtil.addNatureToProject(project, ISeamProject.NATURE_ID);
@@ -530,7 +539,9 @@
public class CreateTestProject extends Job {
IDataModel model = null;
+
IProject seamWebProject = null;
+
SeamRuntime seamRuntime = null;
/**
@@ -550,12 +561,26 @@
protected IStatus run(IProgressMonitor monitor) {
String projectName = model.getProperty(ISeamFacetDataModelProperties.SEAM_PROJECT_NAME).toString();
IProject test = WtpUtils.createEclipseProject(projectName+"-test", monitor);
- File testProjectDir = seamWebProject.getLocation().toFile();
+ File testProjectDir = test.getLocation().toFile();
+ File seamProjectDir = seamWebProject.getLocation().toFile();
File testLibDir = new File(testProjectDir,"lib");
File embededEjbDir = new File(testProjectDir,"embedded-ejb");
FilterSet filterSet = new FilterSet();
filterSet.addFilter("projectName", projectName);
filterSet.addFilter("runtimeName", WtpUtils.getServerRuntimeName(seamWebProject));
+
+ AntCopyUtils.FileSet includeLibs
+ = new AntCopyUtils.FileSet(JBOSS_TEST_LIB_FILESET)
+ .dir(new File(seamRuntime.getHomeDir(),"lib"));
+ File[] libs = includeLibs.getDir().listFiles(new AntCopyUtils.FileSetFileFilter(includeLibs));
+ StringBuffer testLibraries = new StringBuffer();
+
+ for (File file : libs) {
+ testLibraries.append("\t<classpathentry kind=\"lib\" path=\"lib/" + file.getName() + "\"/>\n");
+ }
+
+ filterSet.addFilter("testLibraries",testLibraries.toString());
+
File testTemplateDir = null;
try {
testTemplateDir = new File(SeamFacetInstallDataModelProvider.getTemplatesFolder(),"test");
@@ -563,7 +588,8 @@
SeamCorePlugin.getPluginLog().logError(e);
return new Status(IStatus.ERROR,SeamCorePlugin.PLUGIN_ID,e.getMessage()+"");
}
- AntCopyUtils.FileSet excludeCvsSvn = new AntCopyUtils.FileSet(CVS_SVN).dir(testTemplateDir);
+ AntCopyUtils.FileSet excludeCvsSvn
+ = new AntCopyUtils.FileSet(CVS_SVN).dir(testTemplateDir);
AntCopyUtils.copyFilesAndFolders(
testTemplateDir,
@@ -571,10 +597,23 @@
new AntCopyUtils.FileSetFileFilter(excludeCvsSvn),
new FilterSetCollection(filterSet), true);
- AntCopyUtils.FileSet includeLibs = new AntCopyUtils.FileSet(CVS_SVN).dir(testTemplateDir);
+ excludeCvsSvn.dir(new File(seamRuntime.getHomeDir(),"embedded-ejb/conf"));
+ AntCopyUtils.copyFiles(
+ new File(seamRuntime.getHomeDir(),"embedded-ejb/conf"),
+ embededEjbDir,
+ new AntCopyUtils.FileSetFileFilter(excludeCvsSvn));
+
+ AntCopyUtils.copyFiles(
+ new File(seamRuntime.getHomeDir(),"lib"),
+ testLibDir,
+ new AntCopyUtils.FileSetFileFilter(includeLibs));
+ try {
+ test.refreshLocal(IResource.DEPTH_INFINITE, monitor);
+ } catch (CoreException e) {
+ SeamCorePlugin.getPluginLog().logError(e);
+ }
return Status.OK_STATUS;
}
-
}
}
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-12 09:59:14 UTC (rev 3578)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetPostInstallDelegate.java 2007-09-12 09:59:21 UTC (rev 3579)
@@ -40,7 +40,7 @@
*
*/
public class SeamFacetPostInstallDelegate implements
- IDelegate {
+ IDelegate, ISeamFacetDataModelProperties{
/* (non-Javadoc)
* @see org.eclipse.wst.common.project.facet.core.IDelegate#execute(org.eclipse.core.resources.IProject, org.eclipse.wst.common.project.facet.core.IProjectFacetVersion, java.lang.Object, org.eclipse.core.runtime.IProgressMonitor)
@@ -49,15 +49,43 @@
Object config, IProgressMonitor monitor) throws CoreException {
IEclipsePreferences prefs = SeamCorePlugin.getSeamFacetPreferences(project);
final IDataModel model = (IDataModel)config;
- for (Object propertyName : model.getAllProperties()) {
- Object value = model.getProperty(propertyName.toString());
- prefs.put(propertyName.toString(), value==null?"":value.toString());
+
+ prefs.put(JBOSS_AS_DEPLOY_AS, model.getProperty(JBOSS_AS_DEPLOY_AS).toString());
+
+ prefs.put(SEAM_RUNTIME_NAME, model.getProperty(SEAM_RUNTIME_NAME).toString());
+
+ prefs.put(SEAM_CONNECTION_PROFILE,model.getProperty(SEAM_CONNECTION_PROFILE).toString());
+
+ prefs.put(SESION_BEAN_PACKAGE_NAME, model.getProperty(SESION_BEAN_PACKAGE_NAME).toString());
+
+ prefs.put(ENTITY_BEAN_PACKAGE_NAME, model.getProperty(ENTITY_BEAN_PACKAGE_NAME).toString());
+
+ prefs.put(TEST_CASES_PACKAGE_NAME, model.getProperty(TEST_CASES_PACKAGE_NAME).toString());
+
+ prefs.put(SEAM_TEST_PROJECT,
+ model.getProperty(SEAM_TEST_PROJECT)==null?
+ "":model.getProperty(SEAM_TEST_PROJECT).toString());
+
+ if(DEPLOY_AS_EAR.equals(model.getProperty(JBOSS_AS_DEPLOY_AS))) {
+ prefs.put(SEAM_EJB_PROJECT,
+ model.getProperty(SEAM_EJB_PROJECT)==null?
+ "":model.getProperty(SEAM_EJB_PROJECT).toString());
+
+ prefs.put(SEAM_EAR_PROJECT,
+ model.getProperty(SEAM_EAR_PROJECT)==null?
+ "":model.getProperty(SEAM_EAR_PROJECT).toString());
}
+
try {
prefs.flush();
} catch (BackingStoreException e) {
SeamCorePlugin.getPluginLog().logError(e);
}
-
}
+
+ /**
+ * @see org.eclipse.wst.common.project.facet.core.IActionConfigFactory#create()
+ */
+ public Object create() throws CoreException {return null; }
+
}
Added: trunk/seam/plugins/org.jboss.tools.seam.core/templates/test/.project
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/templates/test/.project (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/templates/test/.project 2007-09-12 09:59:21 UTC (rev 3579)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>lamp-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>
+ </buildSpec>
+ <natures>
+ <nature>org.jboss.ide.eclipse.archives.core.archivesNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Property changes on: trunk/seam/plugins/org.jboss.tools.seam.core/templates/test/.project
___________________________________________________________________
Name: svn:mime-type
+ text/plain
17 years, 4 months
JBoss Tools SVN: r3578 - trunk/seam/plugins/org.jboss.tools.seam.xml.ui.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-09-12 05:59:14 -0400 (Wed, 12 Sep 2007)
New Revision: 3578
Modified:
trunk/seam/plugins/org.jboss.tools.seam.xml.ui/build.properties
Log:
http://jira.jboss.org/jira/browse/JBIDE-825
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml.ui/build.properties
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml.ui/build.properties 2007-09-12 09:59:10 UTC (rev 3577)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml.ui/build.properties 2007-09-12 09:59:14 UTC (rev 3578)
@@ -3,8 +3,7 @@
plugin.properties,\
images/,\
META-INF/,\
- about.html,\
- resources/
+ about.html
source.seam-xml-ui.jar = src/,\
resources/
jars.compile.order = seam-xml-ui.jar
17 years, 4 months