JBoss Tools SVN: r4546 - trunk/core/plugins/org.jboss.ide.eclipse.archives.core.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-10-26 16:56:27 -0400 (Fri, 26 Oct 2007)
New Revision: 4546
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/build.properties
Log:
fix compilations problems on hudson
Modified: trunk/core/plugins/org.jboss.ide.eclipse.archives.core/build.properties
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.core/build.properties 2007-10-26 18:47:33 UTC (rev 4545)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.core/build.properties 2007-10-26 20:56:27 UTC (rev 4546)
@@ -16,7 +16,7 @@
META-INF/,\
src/
output.archivescore.jar = bin/
-jars.compile.order = archivescore.jar,\
- archivescore-eclipse.jar
+jars.compile.order = archivescore-eclipse.jar,\
+ archivescore.jar
source.archivescore-eclipse.jar = src/eclipse/
output.archivescore-eclipse.jar = bin/
16 years, 7 months
JBoss Tools SVN: r4545 - trunk/core/plugins/org.jboss.ide.eclipse.archives.core.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-10-26 14:47:33 -0400 (Fri, 26 Oct 2007)
New Revision: 4545
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/build.properties
Log:
fix for compilation problems on hudson
Modified: trunk/core/plugins/org.jboss.ide.eclipse.archives.core/build.properties
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.core/build.properties 2007-10-26 15:47:22 UTC (rev 4544)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.core/build.properties 2007-10-26 18:47:33 UTC (rev 4545)
@@ -2,7 +2,6 @@
bin.includes = META-INF/,\
plugin.xml,\
archivescore.jar,\
- xml/,\
lib/,\
LICENSE-truezip.txt,\
lib/xercesImpl.jar,\
@@ -13,10 +12,9 @@
source.archivescore.jar = src/main/,\
src/xml/
src.includes = LICENSE-truezip.txt,\
- src/,\
- xml/,\
plugin.xml,\
- META-INF/
+ META-INF/,\
+ src/
output.archivescore.jar = bin/
jars.compile.order = archivescore.jar,\
archivescore-eclipse.jar
16 years, 7 months
JBoss Tools SVN: r4544 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2007-10-26 11:47:22 -0400 (Fri, 26 Oct 2007)
New Revision: 4544
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSelectionBuilder.java
Log:
code adjustment
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSelectionBuilder.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSelectionBuilder.java 2007-10-26 14:51:59 UTC (rev 4543)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSelectionBuilder.java 2007-10-26 15:47:22 UTC (rev 4544)
@@ -637,9 +637,9 @@
if (len > 0) {
visualAnchorContainer = visualNodes.item(0);
String text = visualAnchorContainer.getNodeValue();
- if (sourceAnchorOffset <= text.length()) {
+ if (text!=null&& sourceAnchorOffset <= text.length()) {
visualAnchorOffset = sourceAnchorOffset;
- } else {
+ } else if (text!=null) {
visualAnchorOffset = text.length();
}
}
@@ -679,9 +679,9 @@
if (len > 0) {
visualFocusContainer = visualNodes.item(0);
String text = visualFocusContainer.getNodeValue();
- if (sourceFocusOffset <= text.length()) {
+ if (text!=null&&sourceFocusOffset <= text.length()) {
visualFocusOffset = sourceFocusOffset;
- } else {
+ } else if(text!=null) {
visualFocusOffset = text.length();
}
}
16 years, 7 months
JBoss Tools SVN: r4543 - in trunk/seam/tests/org.jboss.tools.seam.core.test: projects/SeamWebWarTestProject/lib and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2007-10-26 10:51:59 -0400 (Fri, 26 Oct 2007)
New Revision: 4543
Added:
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/lib/ejb3-persistence.jar
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/lib/hibernate-all.jar
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/entity/
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/entity/abcEntity.java
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/.classpath
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java
Log:
http://jira.jboss.com/jira/browse/EXIN-13
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/.classpath
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/.classpath 2007-10-26 14:24:17 UTC (rev 4542)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/.classpath 2007-10-26 14:51:59 UTC (rev 4543)
@@ -4,5 +4,7 @@
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jre1.5.0_10"/>
<classpathentry exported="true" kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
<classpathentry kind="lib" path="lib/jboss-ejb3-all.jar"/>
+ <classpathentry kind="lib" path="lib/ejb3-persistence.jar"/>
+ <classpathentry kind="lib" path="lib/hibernate-all.jar"/>
<classpathentry kind="output" path="build/classes"/>
</classpath>
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/lib/ejb3-persistence.jar
===================================================================
(Binary files differ)
Property changes on: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/lib/ejb3-persistence.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/lib/hibernate-all.jar
===================================================================
(Binary files differ)
Property changes on: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/lib/hibernate-all.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/entity/abcEntity.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/entity/abcEntity.java (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/entity/abcEntity.java 2007-10-26 14:51:59 UTC (rev 4543)
@@ -0,0 +1,58 @@
+package org.domain.SeamWebWarTestProject.entity;
+
+import javax.ejb.Remove;
+import java.io.Serializable;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Version;
+import org.hibernate.validator.Length;
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Scope;
+
+@Entity
+(a)Scope(ScopeType.EVENT)
+public class abcEntity implements Serializable {
+ static final long serialVersionUID = 1000;
+ //seam-gen attributes (you should probably edit these)
+ private Long id;
+ private Integer version;
+ private String name;
+
+ //add additional entity attributes
+
+ //seam-gen attribute getters/setters with annotations (you probably should edit)
+
+ @Id @GeneratedValue
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ @Version
+ public Integer getVersion() {
+ return version;
+ }
+
+ @Remove
+ public void removeMethod(){
+
+ }
+
+ @Remove
+ public void removeMethod2(){
+
+ }
+
+ @Length(max=20)
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+}
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java 2007-10-26 14:24:17 UTC (rev 4542)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java 2007-10-26 14:51:59 UTC (rev 4543)
@@ -202,7 +202,12 @@
}
public void testEntitiesValidator() {
+ ISeamProject seamProject = getSeamProject(project);
+ IFile abcEntityFile = project.getFile("src/action/org/domain/SeamWebWarTestProject/entity/abcEntity.java");
+
+ int number = getMarkersNumber(abcEntityFile);
+ assertTrue("Problem marker was found in abcEntity.java", number == 0);
}
public void testComponentLifeCycleMethodsValidator() {
16 years, 7 months
JBoss Tools SVN: r4542 - trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2007-10-26 10:24:17 -0400 (Fri, 26 Oct 2007)
New Revision: 4542
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/HQLEditor.java
Log:
JBIDE-736 Query editors lost focus after execution
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/HQLEditor.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/HQLEditor.java 2007-10-26 14:23:14 UTC (rev 4541)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/HQLEditor.java 2007-10-26 14:24:17 UTC (rev 4542)
@@ -34,6 +34,11 @@
import org.eclipse.jface.text.source.IVerticalRuler;
import org.eclipse.jface.text.source.projection.ProjectionSupport;
import org.eclipse.jface.text.source.projection.ProjectionViewer;
+import org.eclipse.swt.custom.StyledText;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.MouseAdapter;
+import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
@@ -145,6 +150,23 @@
/* Set a help context ID to enable F1 help. */
getSite().getWorkbenchWindow().getWorkbench().getHelpSystem().setHelp( parent, HELP_CONTEXT_ID );
+ // the following is needed to make sure the editor area gets focus when editing after query execution
+ // TODO: find a better way since this is triggered on evey mouse click and key stroke in the editor area
+ StyledText textWidget = getSourceViewer().getTextWidget();
+ textWidget.addKeyListener(new KeyAdapter() {
+
+ public void keyPressed(KeyEvent e) {
+ getSite().getPage().activate(HQLEditor.this);
+ }
+
+ });
+ textWidget.addMouseListener(new MouseAdapter() {
+
+ public void mouseDown(MouseEvent e) {
+ getSite().getPage().activate(HQLEditor.this);
+ }
+
+ });
}
/**
16 years, 7 months
JBoss Tools SVN: r4541 - trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2007-10-26 10:23:14 -0400 (Fri, 26 Oct 2007)
New Revision: 4541
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/FakeTransactionManagerLookup.java
Log:
fixed some annoying NPE's
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/FakeTransactionManagerLookup.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/FakeTransactionManagerLookup.java 2007-10-26 13:50:20 UTC (rev 4540)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/FakeTransactionManagerLookup.java 2007-10-26 14:23:14 UTC (rev 4541)
@@ -58,12 +58,16 @@
public void commit() throws RollbackException, HeuristicMixedException,
HeuristicRollbackException, SecurityException,
IllegalStateException, SystemException {
- current.commit();
+ if(current!=null) current.commit();
}
public int getStatus() throws SystemException {
- return current.getStatus();
+ if(current!=null) {
+ return current.getStatus();
+ } else {
+ return Status.STATUS_NO_TRANSACTION;
+ }
}
public Transaction getTransaction() throws SystemException {
@@ -72,17 +76,16 @@
public void resume(Transaction tx) throws InvalidTransactionException,
IllegalStateException, SystemException {
- current = (FakeTransaction) tx;
+ current = (FakeTransaction) tx;
}
public void rollback() throws IllegalStateException, SecurityException,
SystemException {
- current.rollback();
-
+ if(current!=null) current.rollback();
}
public void setRollbackOnly() throws IllegalStateException, SystemException {
- current.setRollbackOnly();
+ if(current!=null) current.setRollbackOnly();
}
public void setTransactionTimeout(int t) throws SystemException {
16 years, 7 months
JBoss Tools SVN: r4540 - trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2007-10-26 09:50:20 -0400 (Fri, 26 Oct 2007)
New Revision: 4540
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/SeamEntityWizard.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizard.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1194 Automagically touch server after *some* code generation
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-10-26 13:49:58 UTC (rev 4539)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseOperation.java 2007-10-26 13:50:20 UTC (rev 4540)
@@ -25,7 +25,6 @@
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdaptable;
@@ -41,10 +40,10 @@
import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
import org.eclipse.wst.common.componentcore.resources.IVirtualFile;
import org.eclipse.wst.common.componentcore.resources.IVirtualFolder;
+import org.jboss.tools.jst.web.WebUtils;
import org.jboss.tools.seam.core.SeamCorePlugin;
import org.jboss.tools.seam.core.SeamProjectsSet;
import org.jboss.tools.seam.core.project.facet.SeamRuntimeManager;
-import org.jboss.tools.seam.internal.core.project.facet.ISeamFacetDataModelProperties;
import org.jboss.tools.seam.internal.core.project.facet.SeamFacetFilterSetFactory;
import org.jboss.tools.seam.ui.SeamGuiPlugin;
import org.jboss.tools.seam.ui.widget.editor.INamedElement;
@@ -138,11 +137,15 @@
}
}
});
-
+ if(shouldTouchServer(seamPrjSet)) {
+ WebUtils.changeTimeStamp(project);
+ }
} catch (BackingStoreException e) {
result = new Status(IStatus.ERROR,SeamGuiPlugin.PLUGIN_ID,e.getMessage(),e);
} catch (IOException e) {
result = new Status(IStatus.ERROR,SeamGuiPlugin.PLUGIN_ID,e.getMessage(),e);
+ } catch (CoreException e) {
+ result = new Status(IStatus.ERROR,SeamGuiPlugin.PLUGIN_ID,e.getMessage(),e);
} finally {
try {
// ComponentCore is used to handle case when user changes
@@ -167,6 +170,10 @@
return result;
}
+ protected boolean shouldTouchServer(SeamProjectsSet seamPrjSet) {
+ return !seamPrjSet.isWarConfiguration();
+ }
+
protected String getSessionBeanPackageName(IEclipsePreferences seamFacetPrefs, Map<String, INamedElement> wizardParams) {
return seamFacetPrefs.get(IParameter.SESION_BEAN_PACKAGE_NAME, "");
}
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-26 13:49:58 UTC (rev 4539)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamEntityWizard.java 2007-10-26 13:50:20 UTC (rev 4540)
@@ -18,6 +18,7 @@
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.INewWizard;
+import org.jboss.tools.seam.core.SeamProjectsSet;
import org.jboss.tools.seam.internal.core.project.facet.ISeamFacetDataModelProperties;
import org.jboss.tools.seam.ui.SeamUIMessages;
import org.jboss.tools.seam.ui.widget.editor.INamedElement;
@@ -52,6 +53,11 @@
public static class SeamEntityCreateOperation extends SeamBaseOperation{
@Override
+ protected boolean shouldTouchServer(SeamProjectsSet seamPrjSet) {
+ return true;
+ }
+
+ @Override
protected void loadCustomVariables(Map<String, Object> vars) {
String entityClassname = vars.get(IParameter.SEAM_ENTITY_CLASS_NAME).toString();
String seamComponentName = entityClassname.substring(0,1).toLowerCase()+entityClassname.substring(1);
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-10-26 13:49:58 UTC (rev 4539)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEnitiesWizard.java 2007-10-26 13:50:20 UTC (rev 4540)
@@ -32,9 +32,10 @@
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.INewWizard;
import org.hibernate.eclipse.launch.HibernateLaunchConstants;
+import org.jboss.tools.jst.web.WebUtils;
import org.jboss.tools.seam.core.ISeamProject;
-import org.jboss.tools.seam.core.SeamProjectsSet;
import org.jboss.tools.seam.core.SeamCorePlugin;
+import org.jboss.tools.seam.core.SeamProjectsSet;
import org.jboss.tools.seam.core.project.facet.SeamRuntime;
import org.jboss.tools.seam.core.project.facet.SeamRuntimeManager;
import org.jboss.tools.seam.core.project.facet.SeamVersion;
@@ -70,7 +71,6 @@
ILaunchConfigurationWorkingCopy wc =
launchConfigurationType.newInstance(null, project.getName() + "-generate-entities"); //$NON-NLS-1$
-
//Main
wc.setAttribute(
HibernateLaunchConstants.ATTR_CONSOLE_CONFIGURATION_NAME,
@@ -92,8 +92,6 @@
wc.setAttribute(HibernateLaunchConstants.ATTR_AUTOMATIC_VERSIONING, true);
}
-
-
SeamRuntime seamRt = getRuntime(project);
if(seamRt==null) {
seamRt = getRuntime(project);
@@ -102,17 +100,17 @@
throw new CoreException(new Status(IStatus.ERROR, SeamCorePlugin.PLUGIN_ID, SeamUIMessages.SEAM_GENERATE_ENTITIES_WIZARD_CAN_NOT_FIND_SEAM_RUNTIME + project.getName()));
}
String seamTemplatesRoot = seamRt.getTemplatesDir();
-
+
wc.setAttribute(HibernateLaunchConstants.ATTR_TEMPLATE_DIR, seamTemplatesRoot);
wc.setAttribute(HibernateLaunchConstants.ATTR_USE_OWN_TEMPLATES, true);
-
+
wc.setAttribute(HibernateLaunchConstants.ATTR_ENABLE_JDK5, true);
wc.setAttribute(HibernateLaunchConstants.ATTR_ENABLE_EJB3_ANNOTATIONS, true);
// Create exporters
// TODO Add others exporters
List<String> exporters = new ArrayList<String>();
-
+
exporters.add("hbmtemplate0"); //$NON-NLS-1$
exporters.add("hbmtemplate1"); //$NON-NLS-1$
exporters.add("hbmtemplate2"); //$NON-NLS-1$
@@ -144,7 +142,7 @@
wc.setAttribute(HibernateLaunchConstants.ATTR_EXPORTERS + ".hbmtemplate8.extension_id", "org.hibernate.tools.hbmtemplate"); //$NON-NLS-1$ //$NON-NLS-2$
wc.setAttribute(HibernateLaunchConstants.ATTR_EXPORTERS + ".hbmtemplate9", true); //$NON-NLS-1$
wc.setAttribute(HibernateLaunchConstants.ATTR_EXPORTERS + ".hbmtemplate9.extension_id", "org.hibernate.tools.hbmtemplate"); //$NON-NLS-1$ //$NON-NLS-2$
-
+
Map<String, String> hbmtemplateAttributes = new HashMap<String, String>();
// <hbmtemplate filepattern="{class-name}List.xhtml"
@@ -184,7 +182,7 @@
hbmtemplateAttributes.put("for_each", "entity"); //$NON-NLS-1$ //$NON-NLS-2$
hbmtemplateAttributes.put("hibernatetool.util.toolclass","org.hibernate.eclipse.launch.SeamUtil"); //$NON-NLS-1$ //$NON-NLS-2$
wc.setAttribute(HibernateLaunchConstants.ATTR_EXPORTERS + ".hbmtemplate3.properties", hbmtemplateAttributes); //$NON-NLS-1$
-
+
// <hbmtemplate filepattern="{class-name}Edit.xhtml"
// template="view/edit.xhtml.ftl"
// destdir="${project.home}/view"
@@ -202,8 +200,7 @@
// template="view/edit.page.xml.ftl"
// destdir="${project.home}/view"
// foreach="entity"/>
-
-
+
hbmtemplateAttributes = new HashMap<String, String>();
hbmtemplateAttributes.put("file_pattern", "{class-name}Edit.page.xml"); //$NON-NLS-1$ //$NON-NLS-2$
hbmtemplateAttributes.put("template_name", "view/edit.page.xml.ftl"); //$NON-NLS-1$ //$NON-NLS-2$
@@ -220,12 +217,12 @@
IEclipsePreferences seamFacetPrefs = SeamCorePlugin.getSeamPreferences(project);
final String actionpackage = seamFacetPrefs.get(ISeamFacetDataModelProperties.SESION_BEAN_PACKAGE_NAME, "");
final String actionDir = actionpackage.replace('.','/');
-
+
ISeamProject sprj = (ISeamProject)project.getNature(ISeamProject.NATURE_ID);
boolean seam2 = sprj.getRuntime().getVersion().equals(SeamVersion.SEAM_2_0);
-
+
hbmtemplateAttributes = new HashMap<String, String>();
-
+
if(seam2) {
//Seam2: <property key="actionPackage" value="${action.package}" />
hbmtemplateAttributes.put("actionPackage",actionpackage); //$NON-NLS-1$ //$NON-NLS-2$
@@ -237,7 +234,7 @@
hbmtemplateAttributes.put("outputdir",seamProjectsSet.getActionFolder().getFullPath().toString()); //$NON-NLS-1$
hbmtemplateAttributes.put("for_each", "entity"); //$NON-NLS-1$ //$NON-NLS-2$
hbmtemplateAttributes.put("hibernatetool.util.toolclass","org.hibernate.eclipse.launch.SeamUtil"); //$NON-NLS-1$ //$NON-NLS-2$
-
+
wc.setAttribute(HibernateLaunchConstants.ATTR_EXPORTERS + ".hbmtemplate6.properties", hbmtemplateAttributes); //$NON-NLS-1$
// <hbmtemplate filepattern="{class-name}List.page.xml"
@@ -245,7 +242,6 @@
// destdir="${project.home}/view"
// foreach="entity"/>
-
hbmtemplateAttributes = new HashMap<String, String>();
hbmtemplateAttributes.put("file_pattern", "{class-name}List.page.xml"); //$NON-NLS-1$ //$NON-NLS-2$
hbmtemplateAttributes.put("template_name", "view/list.page.xml.ftl"); //$NON-NLS-1$ //$NON-NLS-2$
@@ -253,7 +249,7 @@
hbmtemplateAttributes.put("for_each", "entity"); //$NON-NLS-1$ //$NON-NLS-2$
hbmtemplateAttributes.put("hibernatetool.util.toolclass","org.hibernate.eclipse.launch.SeamUtil"); //$NON-NLS-1$ //$NON-NLS-2$
wc.setAttribute(HibernateLaunchConstants.ATTR_EXPORTERS + ".hbmtemplate7.properties", hbmtemplateAttributes); //$NON-NLS-1$
-
+
// <hbmtemplate filepattern="{package-name}/{class-name}Home.java"
// template="src/EntityHome.java.ftl"
// destdir="${project.home}/src"
@@ -267,13 +263,13 @@
} else {
hbmtemplateAttributes.put("file_pattern", "{package-name}/{class-name}Home.java"); //$NON-NLS-1$ //$NON-NLS-2$
}
-
+
hbmtemplateAttributes.put("template_name", "src/EntityHome.java.ftl"); //$NON-NLS-1$ //$NON-NLS-2$
hbmtemplateAttributes.put("outputdir",seamProjectsSet.getActionFolder().getFullPath().toString()); //$NON-NLS-1$
hbmtemplateAttributes.put("for_each", "entity"); //$NON-NLS-1$ //$NON-NLS-2$
hbmtemplateAttributes.put("hibernatetool.util.toolclass","org.hibernate.eclipse.launch.SeamUtil"); //$NON-NLS-1$ //$NON-NLS-2$
wc.setAttribute(HibernateLaunchConstants.ATTR_EXPORTERS + ".hbmtemplate8.properties", hbmtemplateAttributes); //$NON-NLS-1$
-
+
// <hbmtemplate filepattern="menu.xhtml"
// template="view/layout/menu.xhtml.ftl"
// destdir="${project.home}/view/layout"
@@ -288,6 +284,8 @@
wc.setAttribute(HibernateLaunchConstants.ATTR_EXPORTERS + ".hbmtemplate9.properties", hbmtemplateAttributes); //$NON-NLS-1$
wc.doSave();
launchManager.addLaunch(wc.launch(ILaunchManager.RUN_MODE, monitor));
+
+ WebUtils.changeTimeStamp(project);
} catch (CoreException e) {
SeamCorePlugin.getDefault().showError(SeamUIMessages.SEAM_GENERATE_ENTITIES_WIZARD_CAN_NOT_GENERATE_SEAM_ENTITIES, e);
}
16 years, 7 months
JBoss Tools SVN: r4539 - trunk/seam/plugins/org.jboss.tools.seam.ui/META-INF.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2007-10-26 09:49:58 -0400 (Fri, 26 Oct 2007)
New Revision: 4539
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/META-INF/MANIFEST.MF
Log:
http://jira.jboss.com/jira/browse/JBIDE-1194 Automagically touch server after *some* code generation
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-26 13:35:26 UTC (rev 4538)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/META-INF/MANIFEST.MF 2007-10-26 13:49:58 UTC (rev 4539)
@@ -51,7 +51,8 @@
org.hibernate.eclipse,
org.eclipse.wst.server.core,
org.eclipse.wst.server.ui,
- org.eclipse.debug.ui
+ org.eclipse.debug.ui,
+ org.jboss.tools.jst.web
Eclipse-LazyStart: true
Export-Package: org.jboss.tools.seam.ui,
org.jboss.tools.seam.ui.actions,
16 years, 7 months
JBoss Tools SVN: r4538 - 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: akazakov
Date: 2007-10-26 09:35:26 -0400 (Fri, 26 Oct 2007)
New Revision: 4538
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/server/ChangeTimeStampActionDelegate.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1194 Automagically touch server after *some* code generation
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-10-26 13:34:59 UTC (rev 4537)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/server/ChangeTimeStampActionDelegate.java 2007-10-26 13:35:26 UTC (rev 4538)
@@ -10,36 +10,30 @@
******************************************************************************/
package org.jboss.tools.jst.web.ui.action.server;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jface.action.*;
-import org.eclipse.jface.viewers.*;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
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.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+import org.jboss.tools.jst.web.WebUtils;
import org.jboss.tools.jst.web.messages.xpl.WebUIMessages;
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 {
-
+
protected IWorkbenchWindow window;
String tooltip = null;
-
+
IProject project = null;
protected String getActionPath() {
return "SaveActions.ChangeTimeStamp"; //$NON-NLS-1$
}
-
+
public void init(IWorkbenchWindow window) {
this.window = window;
}
@@ -58,9 +52,8 @@
} else {
action.setToolTipText(WebUIMessages.CHANGE_TIME_STAMP + project.getName());
}
-
}
-
+
IProject getProject(Object selection) {
if(selection instanceof IResource) {
return ((IResource)selection).getProject();
@@ -70,7 +63,7 @@
}
return null;
}
-
+
protected boolean computeEnabled() {
if(project == null || !project.isAccessible()) return false;
boolean isWar = J2EEProjectUtilities.isDynamicWebProject(project);
@@ -78,60 +71,16 @@
boolean isEJB = J2EEProjectUtilities.isEJBProject(project);
return isEar || isEJB || isWar;
}
-
- List<IFile> getFilesToTouch(IProject project) {
- List<IFile> fs = new ArrayList<IFile>();
- if(project == null || !project.isAccessible()) return fs;
- boolean isWar = J2EEProjectUtilities.isDynamicWebProject(project);
- boolean isEar = J2EEProjectUtilities.isEARProject(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) {
- 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 && !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 {
- doRun();
+ WebUtils.changeTimeStamp(project);
} catch (Exception e) {
WebUiPlugin.getPluginLog().logError(e);
}
}
- protected void doRun() throws Exception {
- if(project == null || !project.isAccessible()) return;
- List<IFile> fs = getFilesToTouch(project);
- for (int i = 0; i < fs.size(); i++) {
- IFile f = (IFile)fs.get(i);
- f.setLocalTimeStamp(System.currentTimeMillis());
- f.touch(new NullProgressMonitor()); // done so deployers/listeners can detect the actual change.
- }
- }
-
public void dispose() {
window = null;
}
-
-}
+}
\ No newline at end of file
16 years, 7 months
JBoss Tools SVN: r4537 - in trunk/jst/plugins/org.jboss.tools.jst.web: src/org/jboss/tools/jst/web and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2007-10-26 09:34:59 -0400 (Fri, 26 Oct 2007)
New Revision: 4537
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/META-INF/MANIFEST.MF
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/WebUtils.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1194 Automagically touch server after *some* code generation
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/META-INF/MANIFEST.MF
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/META-INF/MANIFEST.MF 2007-10-26 13:17:45 UTC (rev 4536)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/META-INF/MANIFEST.MF 2007-10-26 13:34:59 UTC (rev 4537)
@@ -64,6 +64,7 @@
org.eclipse.core.runtime,
org.eclipse.ant.ui,
org.eclipse.ui.externaltools,
- org.jboss.tools.common.kb
+ org.jboss.tools.common.kb,
+ org.eclipse.wst.common.project.facet.core
Bundle-Version: 2.0.0
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/WebUtils.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/WebUtils.java 2007-10-26 13:17:45 UTC (rev 4536)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/WebUtils.java 2007-10-26 13:34:59 UTC (rev 4537)
@@ -10,13 +10,27 @@
******************************************************************************/
package org.jboss.tools.jst.web;
-import java.io.*;
-import java.util.*;
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+import java.util.TreeSet;
+
+import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.JavaCore;
-
+import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
+import org.eclipse.wst.common.componentcore.ComponentCore;
+import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
import org.jboss.tools.common.model.project.IModelNature;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.jst.web.project.WebProject;
@@ -127,4 +141,46 @@
return EclipseResourceUtil.getDefaultJRELibrary();
}
-}
+ public static void changeTimeStamp(IProject project) throws CoreException {
+ if(project == null || !project.isAccessible()) return;
+ List<IFile> fs = getFilesToTouch(project);
+ for (int i = 0; i < fs.size(); i++) {
+ IFile f = (IFile)fs.get(i);
+ f.setLocalTimeStamp(System.currentTimeMillis());
+ f.touch(new NullProgressMonitor()); // done so deployers/listeners can detect the actual change.
+ }
+ }
+
+ private static List<IFile> getFilesToTouch(IProject project) {
+ List<IFile> fs = new ArrayList<IFile>();
+ if(project == null || !project.isAccessible()) return fs;
+ boolean isWar = J2EEProjectUtilities.isDynamicWebProject(project);
+ boolean isEar = J2EEProjectUtilities.isEARProject(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) {
+ 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 && !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;
+ }
+}
\ No newline at end of file
16 years, 7 months