JBoss Tools SVN: r23081 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2010-06-29 08:22:02 -0400 (Tue, 29 Jun 2010)
New Revision: 23081
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/LocalDeploymentModuleTab.java
Log:
JBIDE-6312 - editor saving to old working copy, ineffectual.
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/LocalDeploymentModuleTab.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/LocalDeploymentModuleTab.java 2010-06-29 08:29:44 UTC (rev 23080)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/LocalDeploymentModuleTab.java 2010-06-29 12:22:02 UTC (rev 23081)
@@ -49,10 +49,9 @@
import org.jboss.ide.eclipse.as.core.server.IJBossServerPublisher;
import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
import org.jboss.ide.eclipse.as.core.server.internal.ServerAttributeHelper;
-import org.jboss.ide.eclipse.as.core.util.IJBossToolingConstants;
-import org.jboss.ide.eclipse.as.core.util.ServerUtil;
import org.jboss.ide.eclipse.as.core.util.DeploymentPreferenceLoader.DeploymentModulePrefs;
import org.jboss.ide.eclipse.as.core.util.DeploymentPreferenceLoader.DeploymentPreferences;
+import org.jboss.ide.eclipse.as.core.util.IJBossToolingConstants;
import org.jboss.ide.eclipse.as.ui.Messages;
public class LocalDeploymentModuleTab implements IDeploymentEditorTab {
@@ -79,8 +78,21 @@
private static final String LOCAL_COLUMN_LOC = IJBossToolingConstants.LOCAL_DEPLOYMENT_LOC;
private static final String LOCAL_COLUMN_TEMP_LOC = IJBossToolingConstants.LOCAL_DEPLOYMENT_TEMP_LOC;
+ protected ServerAttributeHelper getHelper() {
+ if( helper == null ) {
+ helper = new ServerAttributeHelper(page.getServer().getOriginal(), page.getServer());
+ } else {
+ String helperTS = helper.getWorkingCopy().getAttribute("timestamp", (String)null);
+ String officialTS = page.getServer().getAttribute("timestamp", (String)null);
+ if( !helperTS.equals(officialTS)) {
+ helper = new ServerAttributeHelper(page.getServer().getOriginal(), page.getServer());
+ }
+ }
+ return helper;
+ }
+
public Control createControl(Composite parent) {
- helper = new ServerAttributeHelper(page.getServer().getOriginal(), page.getServer());
+ getHelper();
Composite random = new Composite(parent, SWT.NONE);
GridData randomData = new GridData(GridData.FILL_BOTH);
@@ -341,16 +353,16 @@
this.text = deployText;
this.newDir = deployText.getText();
this.listener = deployListener;
- this.oldDir = helper.getAttribute(IDeployableServer.DEPLOY_DIRECTORY, ""); //$NON-NLS-1$
+ this.oldDir = getHelper().getAttribute(IDeployableServer.DEPLOY_DIRECTORY, ""); //$NON-NLS-1$
}
public void execute() {
- helper.setAttribute(IDeployableServer.DEPLOY_DIRECTORY, newDir);
+ getHelper().setAttribute(IDeployableServer.DEPLOY_DIRECTORY, newDir);
lastCustomDeploy = newDir;
page.getSaveStatus();
}
public void undo() {
text.removeModifyListener(listener);
- helper.setAttribute(IDeployableServer.DEPLOY_DIRECTORY, oldDir);
+ getHelper().setAttribute(IDeployableServer.DEPLOY_DIRECTORY, oldDir);
text.setText(oldDir);
text.addModifyListener(listener);
page.getSaveStatus();
@@ -362,17 +374,17 @@
boolean newVal;
public SetZipCommand() {
super(page.getServer(), Messages.EditorZipDeployments);
- oldVal = helper.getAttribute(IDeployableServer.ZIP_DEPLOYMENTS_PREF, false);
+ oldVal = getHelper().getAttribute(IDeployableServer.ZIP_DEPLOYMENTS_PREF, false);
newVal = zipDeployWTPProjects.getSelection();
}
public void execute() {
- helper.setAttribute(IDeployableServer.ZIP_DEPLOYMENTS_PREF, newVal);
+ getHelper().setAttribute(IDeployableServer.ZIP_DEPLOYMENTS_PREF, newVal);
page.getSaveStatus();
}
public void undo() {
zipDeployWTPProjects.removeSelectionListener(zipListener);
zipDeployWTPProjects.setSelection(oldVal);
- helper.setAttribute(IDeployableServer.ZIP_DEPLOYMENTS_PREF, oldVal);
+ getHelper().setAttribute(IDeployableServer.ZIP_DEPLOYMENTS_PREF, oldVal);
zipDeployWTPProjects.addSelectionListener(zipListener);
page.getSaveStatus();
}
@@ -388,16 +400,16 @@
text = tempDeployText;
newDir = tempDeployText.getText();
listener = tempDeployListener;
- oldDir = helper.getAttribute(IDeployableServer.TEMP_DEPLOY_DIRECTORY, ""); //$NON-NLS-1$
+ oldDir = getHelper().getAttribute(IDeployableServer.TEMP_DEPLOY_DIRECTORY, ""); //$NON-NLS-1$
}
public void execute() {
- helper.setAttribute(IDeployableServer.TEMP_DEPLOY_DIRECTORY, newDir);
+ getHelper().setAttribute(IDeployableServer.TEMP_DEPLOY_DIRECTORY, newDir);
lastCustomTemp = newDir;
page.getSaveStatus();
}
public void undo() {
text.removeModifyListener(listener);
- helper.setAttribute(IDeployableServer.TEMP_DEPLOY_DIRECTORY, oldDir);
+ getHelper().setAttribute(IDeployableServer.TEMP_DEPLOY_DIRECTORY, oldDir);
text.setText(oldDir);
text.addModifyListener(listener);
page.getSaveStatus();
@@ -476,26 +488,26 @@
newTemp = newTemp == null ? oldTemp : newTemp;
deployText.removeModifyListener(deployListener);
- helper.setAttribute(IDeployableServer.DEPLOY_DIRECTORY, newDir);
+ getHelper().setAttribute(IDeployableServer.DEPLOY_DIRECTORY, newDir);
deployText.setText(newDir);
deployText.addModifyListener(deployListener);
tempDeployText.removeModifyListener(tempDeployListener);
- helper.setAttribute(IDeployableServer.TEMP_DEPLOY_DIRECTORY, newTemp);
+ getHelper().setAttribute(IDeployableServer.TEMP_DEPLOY_DIRECTORY, newTemp);
tempDeployText.setText(newTemp);
tempDeployText.addModifyListener(tempDeployListener);
- helper.setAttribute(IDeployableServer.DEPLOY_DIRECTORY_TYPE, type);
+ getHelper().setAttribute(IDeployableServer.DEPLOY_DIRECTORY_TYPE, type);
page.getSaveStatus();
}
public void undo() {
deployText.removeModifyListener(deployListener);
- helper.setAttribute(IDeployableServer.DEPLOY_DIRECTORY, oldDir);
+ getHelper().setAttribute(IDeployableServer.DEPLOY_DIRECTORY, oldDir);
deployText.setText(oldDir);
deployText.addModifyListener(deployListener);
tempDeployText.removeModifyListener(tempDeployListener);
- helper.setAttribute(IDeployableServer.TEMP_DEPLOY_DIRECTORY, oldTemp);
+ getHelper().setAttribute(IDeployableServer.TEMP_DEPLOY_DIRECTORY, oldTemp);
tempDeployText.setText(oldTemp);
tempDeployText.addModifyListener(tempDeployListener);
@@ -513,7 +525,7 @@
String oldType = oldSelection == customRadio ? IDeployableServer.DEPLOY_CUSTOM :
oldSelection == serverRadio ? IDeployableServer.DEPLOY_SERVER :
IDeployableServer.DEPLOY_METADATA;
- helper.setAttribute(IDeployableServer.DEPLOY_DIRECTORY_TYPE, oldType);
+ getHelper().setAttribute(IDeployableServer.DEPLOY_DIRECTORY_TYPE, oldType);
page.getSaveStatus();
}
}
13 years, 10 months
JBoss Tools SVN: r23080 - in branches/jbosstools-3.1.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core: util and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2010-06-29 04:29:44 -0400 (Tue, 29 Jun 2010)
New Revision: 23080
Added:
branches/jbosstools-3.1.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JSTPublisherXMLToucher.java
Modified:
branches/jbosstools-3.1.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java
branches/jbosstools-3.1.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/IJBossRuntimeResourceConstants.java
Log:
JBDS-1103 - because max said (branch)
Added: branches/jbosstools-3.1.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JSTPublisherXMLToucher.java
===================================================================
--- branches/jbosstools-3.1.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JSTPublisherXMLToucher.java (rev 0)
+++ branches/jbosstools-3.1.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JSTPublisherXMLToucher.java 2010-06-29 08:29:44 UTC (rev 23080)
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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.ide.eclipse.as.core.publishers;
+
+import java.io.File;
+import java.io.FileFilter;
+import java.util.Date;
+import java.util.HashMap;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.wst.server.core.IModule;
+import org.jboss.ide.eclipse.as.core.util.FileUtil;
+import org.jboss.ide.eclipse.as.core.util.IConstants;
+import org.jboss.ide.eclipse.as.core.util.IJBossRuntimeResourceConstants;
+import org.jboss.ide.eclipse.as.core.util.IWTPConstants;
+
+public class JSTPublisherXMLToucher {
+ public static JSTPublisherXMLToucher instance;
+ public static JSTPublisherXMLToucher getInstance() {
+ if( instance == null )
+ instance = new JSTPublisherXMLToucher();
+ return instance;
+ }
+
+ public interface IDescriptorToucher {
+ public void touchDescriptors(IPath moduleRoot);
+ }
+
+ public static class PathDescriptorToucher implements IDescriptorToucher {
+ private IPath[] paths;
+ // Takes relative paths
+ public PathDescriptorToucher(String s) {
+ this(new Path(s));
+ }
+ public PathDescriptorToucher(IPath p) {
+ this(new IPath[]{p});
+ }
+ public PathDescriptorToucher(IPath[] path) {
+ this.paths = path == null ? new IPath[0] : path;
+ }
+ public void touchDescriptors(IPath moduleRoot) {
+ File tmp;
+ for( int i = 0; i < paths.length; i++ ) {
+ tmp = moduleRoot.append(paths[i]).toFile();
+ if( tmp.exists())
+ tmp.setLastModified(new Date().getTime());
+ }
+ }
+ }
+
+ private HashMap<String, IDescriptorToucher> map;
+
+ /**
+ * Constructor limited
+ * This constructor will add default touchers, but any new project type should
+ * add their own custom behaviour or path.
+ */
+ JSTPublisherXMLToucher() {
+ // I know this is ugly but I don't care. it works.
+ map = new HashMap<String, IDescriptorToucher>();
+ IJBossRuntimeResourceConstants i = new IJBossRuntimeResourceConstants(){};
+ map.put(IWTPConstants.FACET_WEB, new PathDescriptorToucher(i.DESCRIPTOR_WEB));
+ map.put(IWTPConstants.FACET_EJB, new PathDescriptorToucher(i.DESCRIPTOR_EJB));
+ map.put(IWTPConstants.FACET_EAR, new PathDescriptorToucher(i.DESCRIPTOR_EAR));
+ map.put(IWTPConstants.FACET_APP_CLIENT, new PathDescriptorToucher(i.DESCRIPTOR_CLIENT));
+ map.put(IWTPConstants.FACET_CONNECTOR, new PathDescriptorToucher(i.DESCRIPTOR_CONNECTOR));
+ }
+
+ public void addDescriptorToucher(String typeId, IDescriptorToucher toucher) {
+ map.put(typeId, toucher);
+ }
+
+ public void touch(IPath root, IModule module) {
+ String id = module.getModuleType().getId();
+ IDescriptorToucher toucher = map.get(id);
+ if( toucher == null )
+ defaultTouch(root);
+ else
+ toucher.touchDescriptors(root);
+ }
+
+
+ // Touch all XML if we don't know what we're doing
+ protected void defaultTouch(IPath deployPath) {
+ // adjust timestamps
+ FileFilter filter = new FileFilter() {
+ public boolean accept(File pathname) {
+ if( pathname.getAbsolutePath().toLowerCase().endsWith(IConstants.EXT_XML))
+ return true;
+ return false;
+ }
+ };
+ FileUtil.touch(filter, deployPath.toFile(), true);
+ }
+}
Modified: branches/jbosstools-3.1.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java
===================================================================
--- branches/jbosstools-3.1.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java 2010-06-29 08:26:01 UTC (rev 23079)
+++ branches/jbosstools-3.1.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java 2010-06-29 08:29:44 UTC (rev 23080)
@@ -11,7 +11,6 @@
package org.jboss.ide.eclipse.as.core.publishers;
import java.io.File;
-import java.io.FileFilter;
import java.util.ArrayList;
import java.util.Arrays;
@@ -125,7 +124,7 @@
list.addAll(Arrays.asList(packModuleIntoJar(moduleTree[moduleTree.length-1], deployPath)));
- touchXMLFiles(deployPath);
+ touchXMLFiles(deployPath, module);
if( list.size() > 0 ) {
MultiStatus ms = new MultiStatus(JBossServerCorePlugin.PLUGIN_ID, IEventCodes.JST_PUB_FULL_FAIL,
@@ -141,16 +140,8 @@
return ret;
}
- private void touchXMLFiles(IPath deployPath) {
- // adjust timestamps
- FileFilter filter = new FileFilter() {
- public boolean accept(File pathname) {
- if( pathname.getAbsolutePath().toLowerCase().endsWith(IConstants.EXT_XML))
- return true;
- return false;
- }
- };
- FileUtil.touch(filter, deployPath.toFile(), true);
+ private void touchXMLFiles(IPath deployPath, IModule module) {
+ JSTPublisherXMLToucher.getInstance().touch(deployPath, module);
}
protected IStatus incrementalPublish(IModule[] moduleTree, IModule module, IProgressMonitor monitor) throws CoreException {
@@ -176,7 +167,7 @@
}
if( handler != null && handler.shouldRestartModule() )
- touchXMLFiles(deployPath);
+ touchXMLFiles(deployPath, module);
IStatus ret = new Status(IStatus.OK, JBossServerCorePlugin.PLUGIN_ID, IEventCodes.JST_PUB_FULL_SUCCESS,
NLS.bind(Messages.CountModifiedMembers, countChanges(delta), module.getName()), null);
Modified: branches/jbosstools-3.1.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/IJBossRuntimeResourceConstants.java
===================================================================
--- branches/jbosstools-3.1.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/IJBossRuntimeResourceConstants.java 2010-06-29 08:26:01 UTC (rev 23079)
+++ branches/jbosstools-3.1.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/IJBossRuntimeResourceConstants.java 2010-06-29 08:29:44 UTC (rev 23080)
@@ -89,4 +89,10 @@
public static final String DEFAULT_CONFIGURATION = CONFIG_DEFAULT;
public static final String CONFIG_ALL = "all"; //$NON-NLS-1$
public static final String CONFIG_MINIMAL = "minimal"; //$NON-NLS-1$
+
+ public static final String DESCRIPTOR_WEB = "WEB-INF/web.xml"; //$NON-NLS-1$
+ public static final String DESCRIPTOR_EJB = "META-INF/ejb-jar.xml"; //$NON-NLS-1$
+ public static final String DESCRIPTOR_EAR = "META-INF/application.xml"; //$NON-NLS-1$
+ public static final String DESCRIPTOR_CLIENT = "META-INF/application-client.xml"; //$NON-NLS-1$
+ public static final String DESCRIPTOR_CONNECTOR = "META-INF/ra.xml"; //$NON-NLS-1$
}
13 years, 10 months
JBoss Tools SVN: r23079 - in trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core: util and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2010-06-29 04:26:01 -0400 (Tue, 29 Jun 2010)
New Revision: 23079
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JSTPublisherXMLToucher.java
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/IJBossRuntimeResourceConstants.java
Log:
JBDS-1103 - because max said so
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JSTPublisherXMLToucher.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JSTPublisherXMLToucher.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JSTPublisherXMLToucher.java 2010-06-29 08:26:01 UTC (rev 23079)
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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.ide.eclipse.as.core.publishers;
+
+import java.io.File;
+import java.io.FileFilter;
+import java.util.Date;
+import java.util.HashMap;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.wst.server.core.IModule;
+import org.jboss.ide.eclipse.as.core.util.FileUtil;
+import org.jboss.ide.eclipse.as.core.util.IConstants;
+import org.jboss.ide.eclipse.as.core.util.IJBossRuntimeResourceConstants;
+import org.jboss.ide.eclipse.as.core.util.IWTPConstants;
+
+public class JSTPublisherXMLToucher {
+ public static JSTPublisherXMLToucher instance;
+ public static JSTPublisherXMLToucher getInstance() {
+ if( instance == null )
+ instance = new JSTPublisherXMLToucher();
+ return instance;
+ }
+
+ public interface IDescriptorToucher {
+ public void touchDescriptors(IPath moduleRoot);
+ }
+
+ public static class PathDescriptorToucher implements IDescriptorToucher {
+ private IPath[] paths;
+ // Takes relative paths
+ public PathDescriptorToucher(String s) {
+ this(new Path(s));
+ }
+ public PathDescriptorToucher(IPath p) {
+ this(new IPath[]{p});
+ }
+ public PathDescriptorToucher(IPath[] path) {
+ this.paths = path == null ? new IPath[0] : path;
+ }
+ public void touchDescriptors(IPath moduleRoot) {
+ File tmp;
+ for( int i = 0; i < paths.length; i++ ) {
+ tmp = moduleRoot.append(paths[i]).toFile();
+ if( tmp.exists())
+ tmp.setLastModified(new Date().getTime());
+ }
+ }
+ }
+
+ private HashMap<String, IDescriptorToucher> map;
+
+ /**
+ * Constructor limited
+ * This constructor will add default touchers, but any new project type should
+ * add their own custom behaviour or path.
+ */
+ JSTPublisherXMLToucher() {
+ // I know this is ugly but I don't care. it works.
+ map = new HashMap<String, IDescriptorToucher>();
+ IJBossRuntimeResourceConstants i = new IJBossRuntimeResourceConstants(){};
+ map.put(IWTPConstants.FACET_WEB, new PathDescriptorToucher(i.DESCRIPTOR_WEB));
+ map.put(IWTPConstants.FACET_EJB, new PathDescriptorToucher(i.DESCRIPTOR_EJB));
+ map.put(IWTPConstants.FACET_EAR, new PathDescriptorToucher(i.DESCRIPTOR_EAR));
+ map.put(IWTPConstants.FACET_APP_CLIENT, new PathDescriptorToucher(i.DESCRIPTOR_CLIENT));
+ map.put(IWTPConstants.FACET_CONNECTOR, new PathDescriptorToucher(i.DESCRIPTOR_CONNECTOR));
+ }
+
+ public void addDescriptorToucher(String typeId, IDescriptorToucher toucher) {
+ map.put(typeId, toucher);
+ }
+
+ public void touch(IPath root, IModule module) {
+ String id = module.getModuleType().getId();
+ IDescriptorToucher toucher = map.get(id);
+ if( toucher == null )
+ defaultTouch(root);
+ else
+ toucher.touchDescriptors(root);
+ }
+
+
+ // Touch all XML if we don't know what we're doing
+ protected void defaultTouch(IPath deployPath) {
+ // adjust timestamps
+ FileFilter filter = new FileFilter() {
+ public boolean accept(File pathname) {
+ if( pathname.getAbsolutePath().toLowerCase().endsWith(IConstants.EXT_XML))
+ return true;
+ return false;
+ }
+ };
+ FileUtil.touch(filter, deployPath.toFile(), true);
+ }
+}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java 2010-06-29 06:05:40 UTC (rev 23078)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java 2010-06-29 08:26:01 UTC (rev 23079)
@@ -11,7 +11,6 @@
package org.jboss.ide.eclipse.as.core.publishers;
import java.io.File;
-import java.io.FileFilter;
import java.util.ArrayList;
import java.util.Arrays;
@@ -39,7 +38,6 @@
import org.jboss.ide.eclipse.as.core.util.FileUtil;
import org.jboss.ide.eclipse.as.core.util.FileUtil.FileUtilListener;
import org.jboss.ide.eclipse.as.core.util.FileUtil.IFileUtilListener;
-import org.jboss.ide.eclipse.as.core.util.IConstants;
import org.jboss.ide.eclipse.as.core.util.ServerConverter;
/**
@@ -124,7 +122,7 @@
list.addAll(Arrays.asList(packModuleIntoJar(moduleTree[moduleTree.length-1], deployPath)));
- touchXMLFiles(deployPath);
+ touchXMLFiles(deployPath, module);
if( list.size() > 0 ) {
MultiStatus ms = new MultiStatus(JBossServerCorePlugin.PLUGIN_ID, IEventCodes.JST_PUB_FULL_FAIL,
@@ -140,16 +138,8 @@
return ret;
}
- private void touchXMLFiles(IPath deployPath) {
- // adjust timestamps
- FileFilter filter = new FileFilter() {
- public boolean accept(File pathname) {
- if( pathname.getAbsolutePath().toLowerCase().endsWith(IConstants.EXT_XML))
- return true;
- return false;
- }
- };
- FileUtil.touch(filter, deployPath.toFile(), true);
+ private void touchXMLFiles(IPath deployPath, IModule module) {
+ JSTPublisherXMLToucher.getInstance().touch(deployPath, module);
}
protected IStatus incrementalPublish(IModule[] moduleTree, IModule module, IProgressMonitor monitor) throws CoreException {
@@ -175,7 +165,7 @@
}
if( handler != null && handler.shouldRestartModule() )
- touchXMLFiles(deployPath);
+ touchXMLFiles(deployPath, module);
IStatus ret = new Status(IStatus.OK, JBossServerCorePlugin.PLUGIN_ID, IEventCodes.JST_PUB_FULL_SUCCESS,
NLS.bind(Messages.CountModifiedMembers, countChanges(delta), module.getName()), null);
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/IJBossRuntimeResourceConstants.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/IJBossRuntimeResourceConstants.java 2010-06-29 06:05:40 UTC (rev 23078)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/util/IJBossRuntimeResourceConstants.java 2010-06-29 08:26:01 UTC (rev 23079)
@@ -90,4 +90,10 @@
public static final String DEFAULT_CONFIGURATION = CONFIG_DEFAULT;
public static final String CONFIG_ALL = "all"; //$NON-NLS-1$
public static final String CONFIG_MINIMAL = "minimal"; //$NON-NLS-1$
+
+ public static final String DESCRIPTOR_WEB = "WEB-INF/web.xml"; //$NON-NLS-1$
+ public static final String DESCRIPTOR_EJB = "META-INF/ejb-jar.xml"; //$NON-NLS-1$
+ public static final String DESCRIPTOR_EAR = "META-INF/application.xml"; //$NON-NLS-1$
+ public static final String DESCRIPTOR_CLIENT = "META-INF/application-client.xml"; //$NON-NLS-1$
+ public static final String DESCRIPTOR_CONNECTOR = "META-INF/ra.xml"; //$NON-NLS-1$
}
13 years, 10 months
JBoss Tools SVN: r23078 - trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2010-06-29 02:05:40 -0400 (Tue, 29 Jun 2010)
New Revision: 23078
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE4179Test.java
Log:
https://jira.jboss.org/browse/JBIDE-6543
- file name and XPath of the node where a VPE content test failed is printed now (part 2).
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE4179Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE4179Test.java 2010-06-29 03:36:20 UTC (rev 23077)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE4179Test.java 2010-06-29 06:05:40 UTC (rev 23078)
@@ -11,7 +11,6 @@
package org.jboss.tools.jsf.vpe.jsf.test.jbide;
import java.io.File;
-import java.util.List;
import org.eclipse.core.resources.IFile;
import org.eclipse.swt.custom.StyledText;
@@ -20,9 +19,7 @@
import org.jboss.tools.jsf.vpe.jsf.test.JsfAllTests;
import org.jboss.tools.vpe.editor.VpeController;
import org.jboss.tools.vpe.ui.test.ComponentContentTest;
-import org.jboss.tools.vpe.ui.test.TestDomUtil;
import org.jboss.tools.vpe.ui.test.TestUtil;
-import org.w3c.dom.Document;
/**
* @author mareshkau
@@ -74,16 +71,8 @@
.getLocation().toFile();
// get document
- Document xmlTestDocument = TestDomUtil.getDocument(xmlTestFile);
- assertNotNull("Can't get test file, possibly file not exists "+xmlTestFile,xmlTestDocument); //$NON-NLS-1$
+ compareContent(vpeController, xmlTestFile);
- List<String> ids = TestDomUtil.getTestIds(xmlTestDocument);
-
- for (String id : ids) {
-
- compareElements(vpeController, xmlTestDocument, id, id);
- }
-
if (getException() != null) {
throw getException();
}
@@ -93,6 +82,4 @@
protected String getTestProjectName() {
return JsfAllTests.IMPORT_PROJECT_NAME;
}
-
-
}
13 years, 10 months
JBoss Tools SVN: r23077 - trunk/build/aggregate.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-06-28 23:36:20 -0400 (Mon, 28 Jun 2010)
New Revision: 23077
Modified:
trunk/build/aggregate/aggregateRepos.jbosstools.properties
trunk/build/aggregate/aggregateRepos.xml
Log:
fix resulting zip name; fix input update sites and assoc sites
Modified: trunk/build/aggregate/aggregateRepos.jbosstools.properties
===================================================================
--- trunk/build/aggregate/aggregateRepos.jbosstools.properties 2010-06-29 00:57:32 UTC (rev 23076)
+++ trunk/build/aggregate/aggregateRepos.jbosstools.properties 2010-06-29 03:36:20 UTC (rev 23077)
@@ -25,23 +25,26 @@
# repos to aggregate - remote paths to a zip will be prefetched and treated as local repo archive
# http://download.jboss.org/jbosstools/builds/nightly/3.2.helios/jbosstools...
repos=\
-http://download.jboss.org/jbosstools/builds/nightly/3.2.helios/jbosstools-3.2.0.M1.helios-Update-SNAPSHOT.zip,\
-http://hudson.qa.jboss.com/hudson/view/DevStudio_CBI/job/jbosstools-cbi-pi4soa/lastSuccessfulBuild/artifact/build/N-SNAPSHOT/pi4soa-Update-N-SNAPSHOT.zip,\
+http://download.jboss.org/jbosstools/builds/nightly/3.2.helios/jbosstools-3.2.0.M1-Update-SNAPSHOT.zip,\
+http://download.jboss.org/jbosstools/builds/nightly/3.2.helios/jbosstools-cbi-pi4soa-Update-SNAPSHOT.zip,\
http://download.jboss.org/jbosstools/builds/nightly/3.2.helios/jbosstools...
# associate sites to add to the resulting repo
associate.sites=http://download.jboss.org/jbosstools/updates/helios/,\
-http://download.eclipse.org/eclipse/updates/3.6milestones/,\
http://download.eclipse.org/eclipse/updates/3.6/,\
-http://download.eclipse.org/birt/update-site/2.6-interim/,\
http://download.eclipse.org/birt/update-site/2.6/,\
http://download.eclipse.org/tptp/updates/galileo/,\
http://m2eclipse.sonatype.org/sites/m2e/,\
http://m2eclipse.sonatype.org/sites/m2e-extras/,\
-http://subclipse.tigris.org/update_1.6.x/,\
-http://download.eclipse.org/technology/subversive/0.7/update-site/,\
-http://community.polarion.com/projects/subversive/download/eclipse/2.0/update-site/
+http://subclipse.tigris.org/update_1.6.x/,\
+http://download.eclipse.org/technology/subversive/0.7/update-site/,\
+http://community.polarion.com/projects/subversive/download/eclipse/2.0/update-site/,\
+http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/updateSite/,\
+http://download.eclipse.org/rt/ecf/3.2/3.6/site.p2
+#http://download.eclipse.org/birt/update-site/2.6-interim/,\
+#http://download.eclipse.org/eclipse/updates/3.6milestones/,\
+
# category to feature mappings: need a list of unique categoryIDs, then the list of features to assign to each category
categories=AllTools2,DataTools2
AllTools2.features=org.pi4soa.core.feature,\
Modified: trunk/build/aggregate/aggregateRepos.xml
===================================================================
--- trunk/build/aggregate/aggregateRepos.xml 2010-06-29 00:57:32 UTC (rev 23076)
+++ trunk/build/aggregate/aggregateRepos.xml 2010-06-29 03:36:20 UTC (rev 23077)
@@ -572,7 +572,7 @@
<!-- zip up the generated repo -->
<target name="zip.repo">
- <zip destfile="${working.dir}/repo-from-packed-plugins.zip"
+ <zip destfile="${working.dir}/aggregate-Update-SNAPSHOT.zip"
basedir="${working.dir}/output/final"
update="false"
/>
13 years, 10 months
JBoss Tools SVN: r23076 - workspace/dgolovin/experimental-build.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-06-28 20:57:32 -0400 (Mon, 28 Jun 2010)
New Revision: 23076
Modified:
workspace/dgolovin/experimental-build/dgolovin-pom.xml
Log:
enable coverage for jmx
Modified: workspace/dgolovin/experimental-build/dgolovin-pom.xml
===================================================================
--- workspace/dgolovin/experimental-build/dgolovin-pom.xml 2010-06-29 00:56:04 UTC (rev 23075)
+++ workspace/dgolovin/experimental-build/dgolovin-pom.xml 2010-06-29 00:57:32 UTC (rev 23076)
@@ -12,7 +12,7 @@
<module>jmx</module>
<module>archives</module>
<module>as</module>
- <!-- -->module>common</module>
+ <!-- module>common</module>
<module>jst</module>
<module>xulrunner</module>
<module>vpe</module>
13 years, 10 months
JBoss Tools SVN: r23075 - workspace/dgolovin/experimental-build and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-06-28 20:56:04 -0400 (Mon, 28 Jun 2010)
New Revision: 23075
Modified:
trunk/jmx/tests/org.jboss.tools.jmx.core.test/pom.xml
workspace/dgolovin/experimental-build/dgolovin-pom.xml
Log:
enable coverage for jmx
Modified: trunk/jmx/tests/org.jboss.tools.jmx.core.test/pom.xml
===================================================================
--- trunk/jmx/tests/org.jboss.tools.jmx.core.test/pom.xml 2010-06-29 00:43:07 UTC (rev 23074)
+++ trunk/jmx/tests/org.jboss.tools.jmx.core.test/pom.xml 2010-06-29 00:56:04 UTC (rev 23075)
@@ -11,6 +11,10 @@
<artifactId>org.jboss.tools.jmx.core.test</artifactId>
<version>1.1.0-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
+ <properties>
+ <emma.filter>org.jboss.tools.jmx.core*</emma.filter>
+ <emma.instrument.bundles>org.jboss.tools.jmx.core</emma.instrument.bundles>
+ </properties>
<build>
<plugins>
<plugin>
Modified: workspace/dgolovin/experimental-build/dgolovin-pom.xml
===================================================================
--- workspace/dgolovin/experimental-build/dgolovin-pom.xml 2010-06-29 00:43:07 UTC (rev 23074)
+++ workspace/dgolovin/experimental-build/dgolovin-pom.xml 2010-06-29 00:56:04 UTC (rev 23075)
@@ -12,7 +12,7 @@
<module>jmx</module>
<module>archives</module>
<module>as</module>
- <module>common</module>
+ <!-- -->module>common</module>
<module>jst</module>
<module>xulrunner</module>
<module>vpe</module>
@@ -37,7 +37,7 @@
<module>ws</module>
<module>modeshape</module>
<module>flow</module>
- <module>jbpm</module>
+ <module>jbpm</module-->
<!-- todo -->
<!--module>drools</module-->
13 years, 10 months
JBoss Tools SVN: r23074 - trunk.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-06-28 20:43:07 -0400 (Mon, 28 Jun 2010)
New Revision: 23074
Modified:
trunk/parent-pom.xml
Log:
coverage profile and requirements profiles added
Modified: trunk/parent-pom.xml
===================================================================
--- trunk/parent-pom.xml 2010-06-28 21:18:24 UTC (rev 23073)
+++ trunk/parent-pom.xml 2010-06-29 00:43:07 UTC (rev 23074)
@@ -18,38 +18,6 @@
</properties>
<build>
- <pluginManagement>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <version>1.3</version>
- <executions>
- <execution>
- <id>prepare-eclipse-base</id>
- <phase>generate-test-resources</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <tasks>
- <echo>Requirements build</echo>
- <echo>requirements=${requirements}</echo>
- <echo>maven.test.skip=${maven.test.skip}</echo>
- <echo>settings.offline=${settings.offline}</echo>
-
- <ant dir="${projectRoot}/requirements" inheritAll="true" >
- <property name="requirements" value="${requirements}" />
- <property name="settings.offline" value="${settings.offline}" />
- </ant>
-
- </tasks>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </pluginManagement>
-
<plugins>
<plugin>
<groupId>org.sonatype.tycho</groupId>
@@ -493,6 +461,158 @@
</repository>
</repositories>
</profile>
+ <profile>
+ <id>coverage</id>
+ <activation>
+ <property>
+ <name>coverage</name>
+ </property>
+ </activation>
+ <properties>
+ <emma.session.out.file>${project.build.directory}/emma/coverage.es</emma.session.out.file>
+ <emma.filter />
+ <emma.instrument.bundles />
+ </properties>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-artifacts</id>
+ <phase>package</phase>
+ <goals>
+ <goal>attach-artifact</goal>
+ </goals>
+ <configuration>
+ <artifacts>
+ <artifact>
+ <file>${emma.session.out.file}</file>
+ <type>es</type>
+ </artifact>
+ </artifacts>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.sonatype.tycho</groupId>
+ <artifactId>maven-osgi-test-plugin</artifactId>
+ <version>${tychoVersion}</version>
+ <configuration>
+ <systemProperties combine.children="append">
+ <emma.session.out.file>${emma.session.out.file}</emma.session.out.file>
+ <emma.filter>${emma.filter}</emma.filter>
+ <eclemma.instrument.bundles>${emma.instrument.bundles}</eclemma.instrument.bundles>
+ </systemProperties>
+ <frameworkExtensions>
+ <frameworkExtension>
+ <groupId>org.eclemma.runtime.equinox</groupId>
+ <artifactId>org.eclemma.runtime.equinox</artifactId>
+ <version>1.1.0.200908261008</version>
+ </frameworkExtension>
+ </frameworkExtensions>
+ <application>org.eclipse.ui.ide.workbench</application>
+ <dependencies>
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.eclipse.sdk.ide</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+ </dependencies>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <dependencies>
+ <dependency>
+ <groupId>emma</groupId>
+ <artifactId>emma_ant</artifactId>
+ <version>2.0.5312</version>
+ </dependency>
+ <dependency>
+ <groupId>emma</groupId>
+ <artifactId>emma</artifactId>
+ <version>2.0.5312</version>
+ </dependency>
+ </dependencies>
+ <executions>
+ <execution>
+ <id>emma-report</id>
+ <phase>post-integration-test</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <taskdef resource="emma_ant.properties" />
+ <echo>Process emma report...</echo>
+ <!--emma enabled="true">
+ <instr metadatafile="${project.build.directory}/emma/coverage.em" mode="overwrite" instrpath="${project.build.directory}/../../../plugins/${emma.instrument.bundles}/target/classes" />
+ </emma-->
+ <emma enabled="true">
+ <report>
+ <infileset dir="${project.build.directory}/emma" includes="*.es,*.em" />
+ <txt outfile="${project.build.directory}/emma/coverage.txt" />
+ <xml outfile="${project.build.directory}/emma/coverage.xml" />
+ <!-- Could also generate an HTML report, if you want... -->
+ </report>
+ </emma>
+ <loadfile property="emma.txt"
+ srcFile="${project.build.directory}/emma/coverage.txt"
+ failonerror="false" />
+ <echo>${emma.txt}</echo>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>requirements</id>
+ <activation>
+ <file>
+ <exists>${basedir}/requirements.properties</exists>
+ </file>
+ </activation>
+ <properties>
+ <requirements.root>${basedir}/../../../requirements</requirements.root>
+ <requirement.build.root>${requirements.root}/target</requirement.build.root>
+ </properties>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.3</version>
+ <executions>
+ <execution>
+ <id>download-plugin-requirements</id>
+ <phase>generate-test-resources</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <property file="requirements.properties" />
+ <echo>Requirements build</echo>
+ <ant dir="${basedir}/../../../requirements" inheritAll="true" >
+ <property name="requirements" value="${requirements}" />
+ <property name="settings.offline" value="${settings.offline}" />
+ <property name="skipDownload" value="${skipDownload}" />
+ </ant>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
</profiles>
<pluginRepositories>
13 years, 10 months
JBoss Tools SVN: r23073 - trunk/build.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-06-28 17:18:24 -0400 (Mon, 28 Jun 2010)
New Revision: 23073
Modified:
trunk/build/publish.sh
Log:
add parsing of [ERROR] Fail...
Modified: trunk/build/publish.sh
===================================================================
--- trunk/build/publish.sh 2010-06-28 21:00:51 UTC (rev 23072)
+++ trunk/build/publish.sh 2010-06-28 21:18:24 UTC (rev 23073)
@@ -67,6 +67,7 @@
fi
el=${WORKSPACE}/site/${JOB_NAME}/ERRORLOG.txt
sed -ne "/<<< ERR/,+9 p" ${bl} | sed -e "/RROR/,+9 s/\(.\+RROR.\+\)/\n----------\n\n\1/g" > ${el}
+sed -ne "/\[ERR/,+2 p" ${bl} | sed -e "/ROR\] Fai/,+2 s/\(.\+ROR\] Fai.\+\)/\n----------\n\n\1/g" >> ${el}
cnt=$(sed -ne "/ERR\|RROR/ p" ${el} | wc -l)
if [[ $cnt != "0" ]]; then
echo "" >> ${el}; echo -n "ERR" >> ${el}; echo "ORS FOUND: "$cnt >> ${el};
13 years, 10 months
JBoss Tools SVN: r23072 - trunk/build.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-06-28 17:00:51 -0400 (Mon, 28 Jun 2010)
New Revision: 23072
Modified:
trunk/build/publish.sh
Log:
typo
Modified: trunk/build/publish.sh
===================================================================
--- trunk/build/publish.sh 2010-06-28 20:32:09 UTC (rev 23071)
+++ trunk/build/publish.sh 2010-06-28 21:00:51 UTC (rev 23072)
@@ -69,7 +69,7 @@
sed -ne "/<<< ERR/,+9 p" ${bl} | sed -e "/RROR/,+9 s/\(.\+RROR.\+\)/\n----------\n\n\1/g" > ${el}
cnt=$(sed -ne "/ERR\|RROR/ p" ${el} | wc -l)
if [[ $cnt != "0" ]]; then
- echo "" >> ${el}; echo -n "ERR" >> ${el}; echo "RORS FOUND: "$cnt >> ${el};
+ echo "" >> ${el}; echo -n "ERR" >> ${el}; echo "ORS FOUND: "$cnt >> ${el};
fi
rsync -arzq ${WORKSPACE}/site/${JOB_NAME}/*LOG.txt $DESTINATION/${JOB_NAME}/
13 years, 10 months