geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sppa...@apache.org
Subject svn commit: r440899 - in /geronimo/devtools/eclipse-plugin/trunk/plugins: org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/ org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/commands/ org.apache.geronimo.st.v1.core/src/org/apache/g...
Date Wed, 06 Sep 2006 23:30:52 GMT
Author: sppatel
Date: Wed Sep  6 16:30:51 2006
New Revision: 440899

URL: http://svn.apache.org/viewvc?view=rev&rev=440899
Log:
Allow in-place shared lib support to be set via server editor, rename unused SetPersistantCommand
and setPersistant prop to inPlaceSharedLib 

Added:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/commands/SetInPlaceSharedLibCommand.java
      - copied, changed from r438572, geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/commands/SetInPlaceDeploymentCommand.java
Removed:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/commands/SetInPlaceDeploymentCommand.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/commands/SetPersistentCommand.java
Modified:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/IGeronimoServer.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/commands/DeployCommand.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.core/src/org/apache/geronimo/st/v1/core/GeronimoServer.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/GeronimoServer.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/GeronimoServerBehaviour.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/internal/Messages.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/internal/Messages.properties
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/ServerEditorTestEnvSection.java

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/IGeronimoServer.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/IGeronimoServer.java?view=diff&rev=440899&r1=440898&r2=440899
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/IGeronimoServer.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/IGeronimoServer.java
Wed Sep  6 16:30:51 2006
@@ -41,9 +41,7 @@
 
 	public IGeronimoVersionHandler getVersionHandler();
 	
-	public boolean isPersistant();
-	
-	public boolean isInPlace();
+	public boolean isInPlaceSharedLib();
 	
 	public boolean isRunFromWorkspace();
 

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/commands/DeployCommand.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/commands/DeployCommand.java?view=diff&rev=440899&r1=440898&r2=440899
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/commands/DeployCommand.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/org/apache/geronimo/st/core/commands/DeployCommand.java
Wed Sep  6 16:30:51 2006
@@ -54,7 +54,7 @@
 		} else {
 			IPath outputDir = DeploymentUtils.STATE_LOC.append("server_" + getServer().getId());
 			outputDir.toFile().mkdirs();
-			if(gs.isInPlace()) {
+			if(gs.isInPlaceSharedLib()) {
 				file = DeploymentUtils.generateExplodedConfiguration(getModule(), outputDir).toFile();
 			} else {
 				file = DeploymentUtils.createJarFile(getModule(), outputDir);

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.core/src/org/apache/geronimo/st/v1/core/GeronimoServer.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.core/src/org/apache/geronimo/st/v1/core/GeronimoServer.java?view=diff&rev=440899&r1=440898&r2=440899
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.core/src/org/apache/geronimo/st/v1/core/GeronimoServer.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v1.core/src/org/apache/geronimo/st/v1/core/GeronimoServer.java
Wed Sep  6 16:30:51 2006
@@ -104,16 +104,9 @@
 	}
 	
 	/* (non-Javadoc)
-	 * @see org.apache.geronimo.st.core.IGeronimoServer#isPersistant()
-	 */
-	public boolean isPersistant() {
-		return true;
-	}
-	
-	/* (non-Javadoc)
 	 * @see org.apache.geronimo.st.core.IGeronimoServer#isInPlace()
 	 */
-	public boolean isInPlace() {
+	public boolean isInPlaceSharedLib() {
 		return false;
 	}
 	

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/GeronimoServer.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/GeronimoServer.java?view=diff&rev=440899&r1=440898&r2=440899
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/GeronimoServer.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/GeronimoServer.java
Wed Sep  6 16:30:51 2006
@@ -30,7 +30,7 @@
 public class GeronimoServer extends GeronimoServerDelegate {
 	
 	public static final String PROPERTY_PERSISTENT = "persistent";
-	public static final String PROPERTY_IN_PLACE = "inPlace";
+	public static final String PROPERTY_IN_PLACE_SHARED_LIB = "inPlace";
 	public static final String PROPERTY_RUN_FROM_WORKSPACE = "runFromWorkspace";
 
 	private static IGeronimoVersionHandler versionHandler = null;
@@ -92,7 +92,7 @@
 	 */
 	public void configureDeploymentManager(DeploymentManager dm) {
 		((JMXDeploymentManager) dm).setLogConfiguration(true, true);
-		boolean enableInPlace = SocketUtil.isLocalhost(getServer().getHost()) && isInPlace();
+		boolean enableInPlace = SocketUtil.isLocalhost(getServer().getHost()) && isInPlaceSharedLib();
 		setInPlaceDeployment(dm, enableInPlace);
 	}
 
@@ -121,8 +121,8 @@
 	/* (non-Javadoc)
 	 * @see org.apache.geronimo.st.core.IGeronimoServer#isInPlace()
 	 */
-	public boolean isInPlace() {
-		return getAttribute(PROPERTY_IN_PLACE, false);
+	public boolean isInPlaceSharedLib() {
+		return getAttribute(PROPERTY_IN_PLACE_SHARED_LIB, false);
 	}
 	
 	/* (non-Javadoc)
@@ -132,12 +132,8 @@
 		return getAttribute(PROPERTY_RUN_FROM_WORKSPACE, false);
 	}
 	
-	public void setPersistent(boolean enable) {
-		setAttribute(PROPERTY_PERSISTENT, enable);
-	}
-	
-	public void setInPlace(boolean enable) {
-		setAttribute(PROPERTY_IN_PLACE, enable);
+	public void setInPlaceSharedLib(boolean enable) {
+		setAttribute(PROPERTY_IN_PLACE_SHARED_LIB, enable);
 	}
 	
 	public void setRunFromWorkspace(boolean enable) {
@@ -149,8 +145,7 @@
 	 */
 	public void setDefaults(IProgressMonitor monitor) {
 		super.setDefaults(monitor);
-		setPersistent(true);
-		setInPlace(false);
+		setInPlaceSharedLib(false);
 		setRunFromWorkspace(false);
 	}
 

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/GeronimoServerBehaviour.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/GeronimoServerBehaviour.java?view=diff&rev=440899&r1=440898&r2=440899
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/GeronimoServerBehaviour.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.core/src/org/apache/geronimo/st/v11/core/GeronimoServerBehaviour.java
Wed Sep  6 16:30:51 2006
@@ -20,15 +20,10 @@
 
 import javax.enterprise.deploy.spi.DeploymentManager;
 import javax.enterprise.deploy.spi.TargetModuleID;
-import javax.enterprise.deploy.spi.exceptions.TargetException;
-import javax.enterprise.deploy.spi.status.ProgressEvent;
-import javax.enterprise.deploy.spi.status.ProgressListener;
 import javax.enterprise.deploy.spi.status.ProgressObject;
 import javax.management.MBeanServerConnection;
 import javax.naming.directory.NoSuchAttributeException;
 
-import org.apache.geronimo.deployment.plugin.TargetModuleIDImpl;
-import org.apache.geronimo.deployment.util.DeploymentUtil;
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.gbean.AbstractNameQuery;
 import org.apache.geronimo.gbean.GBeanData;
@@ -40,7 +35,6 @@
 import org.apache.geronimo.kernel.config.PersistentConfigurationList;
 import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.st.core.Activator;
-import org.apache.geronimo.st.core.DeploymentUtils;
 import org.apache.geronimo.st.core.GeronimoConnectionFactory;
 import org.apache.geronimo.st.core.GeronimoServerBehaviourDelegate;
 import org.apache.geronimo.st.core.commands.DeploymentCommandFactory;
@@ -243,6 +237,11 @@
 	}
 
 	private void updateSharedLib(IModule module) throws CoreException {
+		
+		if(isRemote() || !getGeronimoServer().isInPlaceSharedLib()) {
+			return;
+		}
+		
 		IDataModel model = DataModelFactory.createDataModel(new SharedLibEntryDataModelProvider());
 		model.setProperty(ISharedLibEntryCreationDataModelProperties.MODULE, module);
 		IDataModelOperation op = new SharedLibEntryCreationOperation(model);

Copied: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/commands/SetInPlaceSharedLibCommand.java
(from r438572, geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/commands/SetInPlaceDeploymentCommand.java)
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/commands/SetInPlaceSharedLibCommand.java?view=diff&rev=440899&p1=geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/commands/SetInPlaceDeploymentCommand.java&r1=438572&p2=geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/commands/SetInPlaceSharedLibCommand.java&r2=440899
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/commands/SetInPlaceDeploymentCommand.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/commands/SetInPlaceSharedLibCommand.java
Wed Sep  6 16:30:51 2006
@@ -19,7 +19,7 @@
 import org.apache.geronimo.st.v11.core.GeronimoServer;
 import org.eclipse.wst.server.core.IServerWorkingCopy;
 
-public class SetInPlaceDeploymentCommand extends ServerCommand {
+public class SetInPlaceSharedLibCommand extends ServerCommand {
 
 	boolean value;
 
@@ -29,8 +29,8 @@
 	 * @param server
 	 * @param name
 	 */
-	public SetInPlaceDeploymentCommand(IServerWorkingCopy server, boolean value) {
-		super(server, "SetInPlaceDeploymentCommand");
+	public SetInPlaceSharedLibCommand(IServerWorkingCopy server, boolean value) {
+		super(server, "SetInPlaceSharedLibCommand");
 		this.value = value;
 	}
 
@@ -41,8 +41,8 @@
 	 */
 	public void execute() {
 		GeronimoServer gs = (GeronimoServer) server.getAdapter(GeronimoServer.class);
-		oldValue = gs.isInPlace();
-		gs.setInPlace(value);
+		oldValue = gs.isInPlaceSharedLib();
+		gs.setInPlaceSharedLib(value);
 	}
 
 	/*
@@ -52,7 +52,7 @@
 	 */
 	public void undo() {
 		GeronimoServer gs = (GeronimoServer) server.getAdapter(GeronimoServer.class);
-		gs.setInPlace(oldValue);
+		gs.setInPlaceSharedLib(oldValue);
 	}
 
 }

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/internal/Messages.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/internal/Messages.java?view=diff&rev=440899&r1=440898&r2=440899
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/internal/Messages.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/internal/Messages.java
Wed Sep  6 16:30:51 2006
@@ -13,8 +13,7 @@
 	public static String editorSectionTestEnvTitle;
 	public static String editorSectionTestEnvDescription;
 	public static String editorSectionRunFromWorkspace;
-	public static String editorSectionEnableInPlace;
-	public static String editorSectionSetPersistent;
+	public static String editorSectionSharedLibrariesInPlace;
 	public static String gBeanLink;
 	public static String groupId;
 	public static String moduleId;

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/internal/Messages.properties
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/internal/Messages.properties?view=diff&rev=440899&r1=440898&r2=440899
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/internal/Messages.properties
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/internal/Messages.properties
Wed Sep  6 16:30:51 2006
@@ -1,8 +1,7 @@
 editorSectionTestEnvTitle=Test Environment
 editorSectionTestEnvDescription=Configure local test environment options.
-editorSectionSetPersistent=Enable application persistance
-editorSectionEnableInPlace=Enable in-place deployment
-editorSectionRunFromWorkspace=Run stand-alone modules directly from workspace.
+editorSectionSharedLibrariesInPlace=Enable in-place shared library support.
+editorSectionRunFromWorkspace=Run modules directly from workspace.
 seeRestrictions=This feature currently has restrictions.  See the release notes for more
details.
 
 groupId=Group Id:

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/ServerEditorTestEnvSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/ServerEditorTestEnvSection.java?view=diff&rev=440899&r1=440898&r2=440899
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/ServerEditorTestEnvSection.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v11.ui/src/org/apache/geronimo/st/v11/ui/sections/ServerEditorTestEnvSection.java
Wed Sep  6 16:30:51 2006
@@ -16,7 +16,7 @@
 package org.apache.geronimo.st.v11.ui.sections;
 
 import org.apache.geronimo.st.v11.core.GeronimoServer;
-import org.apache.geronimo.st.v11.ui.commands.SetInPlaceDeploymentCommand;
+import org.apache.geronimo.st.v11.ui.commands.SetInPlaceSharedLibCommand;
 import org.apache.geronimo.st.v11.ui.commands.SetRunFromWorkspaceCommand;
 import org.apache.geronimo.st.v11.ui.internal.Messages;
 import org.eclipse.swt.SWT;
@@ -35,7 +35,7 @@
 
 	private Button runFromWorkspace;
 
-	private Button inPlace;
+	private Button inPlaceSharedLib;
 
 	/*
 	 * (non-Javadoc)
@@ -67,32 +67,23 @@
 		composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
 		section.setClient(composite);
 
-		inPlace = toolkit.createButton(composite, Messages.editorSectionEnableInPlace, SWT.CHECK);
+		inPlaceSharedLib = toolkit.createButton(composite, Messages.editorSectionSharedLibrariesInPlace,
SWT.CHECK);
 		runFromWorkspace = toolkit.createButton(composite, Messages.editorSectionRunFromWorkspace,
SWT.CHECK);
 		runFromWorkspace.setToolTipText(Messages.seeRestrictions);
 
 		GeronimoServer gs = (GeronimoServer) server.getAdapter(GeronimoServer.class);
-		inPlace.setSelection(gs.isInPlace());
+		inPlaceSharedLib.setSelection(gs.isInPlaceSharedLib());
 		runFromWorkspace.setSelection(gs.isRunFromWorkspace());
-		
-		//TODO temporarily disable support until new implementation
-		inPlace.setEnabled(false);
-		runFromWorkspace.setEnabled(false);
 
 		GridData data = new GridData();
-		data.horizontalIndent = 20;
 		runFromWorkspace.setLayoutData(data);
-		runFromWorkspace.setEnabled(inPlace.getSelection());
-
-		inPlace.addSelectionListener(new SelectionListener() {
+		// TODO temporarily disable support until new implementation
+		runFromWorkspace.setEnabled(false);
 
+		inPlaceSharedLib.addSelectionListener(new SelectionListener() {
+			
 			public void widgetSelected(SelectionEvent e) {
-				execute(new SetInPlaceDeploymentCommand(server, inPlace.getSelection()));
-				runFromWorkspace.setEnabled(inPlace.getSelection());
-				if (!inPlace.getSelection()) {
-					runFromWorkspace.setSelection(false);
-					execute(new SetRunFromWorkspaceCommand(server, runFromWorkspace.getSelection()));
-				}
+				execute(new SetInPlaceSharedLibCommand(server, inPlaceSharedLib.getSelection()));
 			}
 
 			public void widgetDefaultSelected(SelectionEvent e) {



Mime
View raw message