JBoss Tools SVN: r19657 - trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2010-01-05 19:53:40 -0500 (Tue, 05 Jan 2010)
New Revision: 19657
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ProjectRuntimeClasspathProvider.java
Log:
JBIDE-4889 -rollback until snjezana explains the problem better
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ProjectRuntimeClasspathProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ProjectRuntimeClasspathProvider.java 2010-01-06 00:23:22 UTC (rev 19656)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ProjectRuntimeClasspathProvider.java 2010-01-06 00:53:40 UTC (rev 19657)
@@ -66,7 +66,7 @@
IClasspathEntry[] entries =
new WebtoolsProjectJBossClasspathContainer(path).getClasspathEntries();
return Arrays.asList(entries);
- } else if( isPrimaryFacet(fv.getProjectFacet())){
+ } else /*if( isPrimaryFacet(fv.getProjectFacet())) */{
String id = rc.getProperty("id"); //$NON-NLS-1$
IPath containerPath = new Path("org.eclipse.jst.server.core.container").append("org.jboss.ide.eclipse.as.core.server.runtime.runtimeTarget"); //$NON-NLS-1$ //$NON-NLS-2$
path = containerPath.append(id);
14 years, 11 months
JBoss Tools SVN: r19656 - in trunk/as/plugins: org.jboss.ide.eclipse.as.ssh and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2010-01-05 19:23:22 -0500 (Tue, 05 Jan 2010)
New Revision: 19656
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.properties
trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
trunk/as/plugins/org.jboss.ide.eclipse.as.ssh/plugin.properties
trunk/as/plugins/org.jboss.ide.eclipse.as.ssh/plugin.xml
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/StrippedServerWizardFragment.java
Log:
JBIDE-5505 - cleanup for deploy only server
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.properties
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.properties 2010-01-05 23:15:33 UTC (rev 19655)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.properties 2010-01-06 00:23:22 UTC (rev 19656)
@@ -1,6 +1,7 @@
pluginName=JBoss WTP Server Tools Core Plugin
providerName=JBoss Community
enterpriseProviderName=JBoss Enterprise Middleware
+basicProviderName=Basic
# Version Delegates
jboss.version.32.name=JBoss AS 3.2
@@ -31,8 +32,11 @@
jboss.eap.version.50.description=JBoss Enterprise Application Platform (EAP) 5.0
jboss.eap.version.50.runtime.name=JBoss Enterprise Application Platform 5.0 Runtime
-deploy.runtime.name=JBoss Deploy-Only Runtime
+deploy.runtime.name=Local Deployer Runtime
deploy.runtime.description=A runtime provided to allow a deploy-only server the ability to deploy certain project types.
+deploy.server.name=Local Deployer
+deploy.server.description=A server which only provides a deploy folder for publishing.
+
Bundle-Vendor.0 = JBoss by Red Hat
Bundle-Name.0 = JBoss AS Core Plug-in
\ No newline at end of file
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2010-01-05 23:15:33 UTC (rev 19655)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2010-01-06 00:23:22 UTC (rev 19656)
@@ -132,10 +132,10 @@
<serverType
behaviourClass="org.jboss.ide.eclipse.as.core.server.internal.DeployableServerBehavior"
class="org.jboss.ide.eclipse.as.core.server.internal.DeployableServer"
- description="A server which only provides a deploy folder for publishing."
+ description="%deploy.server.description"
hasConfiguration="false"
id="org.jboss.ide.eclipse.as.systemCopyServer"
- name="JBoss Deploy-Only Server"
+ name="%deploy.server.name"
runtime="false"
runtimeTypeId="org.jboss.ide.eclipse.as.runtime.stripped"
supportsRemoteHosts="true"/>
@@ -388,7 +388,7 @@
description="%deploy.runtime.description"
id="org.jboss.ide.eclipse.as.runtime.stripped"
name="%deploy.runtime.name"
- vendor="%providerName"
+ vendor="%basicProviderName"
version="1.0">
<moduleType
types="jst.web"
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ssh/plugin.properties
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ssh/plugin.properties 2010-01-05 23:15:33 UTC (rev 19655)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ssh/plugin.properties 2010-01-06 00:23:22 UTC (rev 19656)
@@ -1,2 +1,8 @@
+ssh.server.description=A server which simply scp's files to a destination host and location
+ssh.server.name=SCP Remote Deployer
+ssh.runtime.description=A runtime to allow SCP servers to support every module type.
+ssh.runtime.name=SCP Remote Deployer Runtime
+
+basic.vendor=Basic
Bundle-Vendor.0=JBoss by Red Hat
-Bundle-Name.0=JBoss SSH Server Plugin
\ No newline at end of file
+Bundle-Name.0=JBoss SCP Server Plugin
\ No newline at end of file
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ssh/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ssh/plugin.xml 2010-01-05 23:15:33 UTC (rev 19655)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ssh/plugin.xml 2010-01-06 00:23:22 UTC (rev 19656)
@@ -6,9 +6,9 @@
<serverType
behaviourClass="org.jboss.ide.eclipse.as.ssh.server.SSHServerBehaviourDelegate"
class="org.jboss.ide.eclipse.as.ssh.server.SSHServerDelegate"
- description="A server which simply scp's files to a destination host and location"
+ description="%ssh.server.description"
id="org.jboss.ide.eclipse.as.ssh.server.remoteServerType"
- name="SCP Remote Server"
+ name="%ssh.server.name"
runtime="false"
runtimeTypeId="org.jboss.ide.eclipse.as.ssh.server.remoteServerRuntimeType"
supportsRemoteHosts="true">
@@ -24,10 +24,10 @@
<extension
point="org.eclipse.wst.server.core.runtimeTypes">
<runtimeType
- vendor="JBoss Community"
+ vendor="%basic.vendor"
class="org.jboss.ide.eclipse.as.ssh.server.SSHServerRuntime"
- description="A runtime to allow SSH servers to support every module type. "
- name="SSH Runtime"
+ description="%ssh.runtime.description"
+ name="%ssh.runtime.name"
id="org.jboss.ide.eclipse.as.ssh.server.remoteServerRuntimeType"
version="1.0">
<moduleType
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties 2010-01-05 23:15:33 UTC (rev 19655)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties 2010-01-06 00:23:22 UTC (rev 19656)
@@ -45,7 +45,7 @@
swf_DeployDirectory=Deploy Directory
swf_TempDeployDirectory=Temporary Deploy Directory
swf_CloneConfiguration=Copy this configuration into workspace metadata
-sswf_Title=Create a new System Copy Server
+sswf_Title=Create a new Local Deployer Server
sswf_BaseName=Local Deployer
credentials_warning=Your server is responding to JMX inquiries with a Security Exception.\nYou can try entering new credentials below, or you can double-click\non your server and verify that the host, JNDI port, username, and password are accurate.\nYou can also click "ignore" below to begin working with your server,\nbut deploying to and stopping the server may not function properly.
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/StrippedServerWizardFragment.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/StrippedServerWizardFragment.java 2010-01-05 23:15:33 UTC (rev 19655)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/StrippedServerWizardFragment.java 2010-01-06 00:23:22 UTC (rev 19656)
@@ -49,6 +49,8 @@
import org.eclipse.wst.server.core.internal.ServerWorkingCopy;
import org.eclipse.wst.server.ui.wizard.IWizardHandle;
import org.eclipse.wst.server.ui.wizard.WizardFragment;
+import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
+import org.jboss.ide.eclipse.as.core.server.IJBossServerConstants;
import org.jboss.ide.eclipse.as.core.server.internal.DeployableServer;
import org.jboss.ide.eclipse.as.ui.JBossServerUIPlugin;
import org.jboss.ide.eclipse.as.ui.JBossServerUISharedImages;
@@ -63,10 +65,10 @@
private IWizardHandle handle;
- private Label deployLabel, tempDeployLabel, nameLabel;
- private Text deployText, tempDeployText, nameText;
- private Button browse, tempBrowse;
- private String name, deployLoc, tempDeployLoc;
+ private Label deployLabel, nameLabel;
+ private Text deployText, nameText;
+ private Button browse;
+ private String name, deployLoc;
public StrippedServerWizardFragment() {
}
@@ -85,13 +87,7 @@
browse = new Button(main, SWT.PUSH);
deployLabel.setText(Messages.swf_DeployDirectory);
browse.setText(Messages.browse);
-
- tempDeployLabel = new Label(main, SWT.NONE);
- tempDeployText = new Text(main, SWT.BORDER);
- tempBrowse = new Button(main, SWT.PUSH);
- tempDeployLabel.setText(Messages.swf_TempDeployDirectory);
- tempBrowse.setText(Messages.browse);
-
+
FormData namelData = new FormData();
namelData.top = new FormAttachment(0,5);
namelData.left = new FormAttachment(0,5);
@@ -118,25 +114,7 @@
bData.right = new FormAttachment(100,-5);
bData.top = new FormAttachment(nameText,5);
browse.setLayoutData(bData);
-
- FormData templData = new FormData();
- templData.top = new FormAttachment(deployText,5);
- templData.left = new FormAttachment(0,5);
- tempDeployLabel.setLayoutData(templData);
-
- FormData temptData = new FormData();
- temptData.top = new FormAttachment(deployText,5);
- temptData.left = new FormAttachment(tempDeployLabel,5);
- temptData.right = new FormAttachment(tempBrowse, -5);
- tempDeployText.setLayoutData(temptData);
-
- FormData tempbData = new FormData();
- tempbData.right = new FormAttachment(100,-5);
- tempbData.top = new FormAttachment(deployText,5);
- tempBrowse.setLayoutData(tempbData);
-
-
ModifyListener ml = new ModifyListener() {
public void modifyText(ModifyEvent e) {
textChanged();
@@ -155,21 +133,8 @@
}
});
- tempBrowse.addSelectionListener(new SelectionListener() {
- public void widgetDefaultSelected(SelectionEvent e) {
- }
- public void widgetSelected(SelectionEvent e) {
- DirectoryDialog d = new DirectoryDialog(new Shell());
- d.setFilterPath(tempDeployText.getText());
- String x = d.open();
- if( x != null )
- tempDeployText.setText(x);
- }
- });
-
deployText.addModifyListener(ml);
- tempDeployText.addModifyListener(ml);
nameText.addModifyListener(ml);
nameText.setText(getDefaultNameText());
handle.setImageDescriptor(JBossServerUISharedImages.getImageDescriptor(JBossServerUISharedImages.WIZBAN_JBOSS_LOGO));
@@ -180,7 +145,6 @@
IStatus status = checkErrors();
if( status.isOK() ) {
deployLoc = deployText.getText();
- tempDeployLoc = tempDeployText.getText();
name = nameText.getText();
handle.setMessage("", IStatus.OK); //$NON-NLS-1$
handle.update();
@@ -197,15 +161,10 @@
if( !f.exists() || !f.isDirectory() ) {
return new Status(IStatus.WARNING, JBossServerUIPlugin.PLUGIN_ID, IStatus.OK, Messages.StrippedServerWizardFragment_DeployFolderDoesNotExistStatusMessage, null);
}
- f = new File(tempDeployText.getText());
- if( !f.exists() || !f.isDirectory() ) {
- return new Status(IStatus.WARNING, JBossServerUIPlugin.PLUGIN_ID, IStatus.OK, Messages.StrippedServerWizardFragment_TemporaryDeployFolderDoesNotExistStatusMessage, null);
- }
return new Status(IStatus.OK, JBossServerUIPlugin.PLUGIN_ID, IStatus.OK, "", null); //$NON-NLS-1$
}
public void enter() {
- //handle.setTitle("Create a new System Copy Server");
handle.setTitle(Messages.sswf_Title);
IServer s = (IServer) getTaskModel().getObject(TaskModel.TASK_SERVER);
IServerWorkingCopy swc;
@@ -234,7 +193,8 @@
swcInternal = (ServerWorkingCopy)swc;
swcInternal.setName(name);
swcInternal.setAttribute(DeployableServer.DEPLOY_DIRECTORY, deployLoc);
- swcInternal.setAttribute(DeployableServer.TEMP_DEPLOY_DIRECTORY, tempDeployLoc);
+ String tempFolder = JBossServerCorePlugin.getServerStateLocation(s).append(IJBossServerConstants.TEMP_DEPLOY).makeAbsolute().toString();
+ swcInternal.setAttribute(DeployableServer.TEMP_DEPLOY_DIRECTORY, tempFolder);
getTaskModel().putObject(TaskModel.TASK_SERVER, swcInternal);
}
}
14 years, 11 months
JBoss Tools SVN: r19655 - trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2010-01-05 18:15:33 -0500 (Tue, 05 Jan 2010)
New Revision: 19655
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ProjectRuntimeClasspathProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/WebtoolsProjectJBossClasspathContainerInitializer.java
Log:
JBIDE-4889
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ProjectRuntimeClasspathProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ProjectRuntimeClasspathProvider.java 2010-01-05 20:53:24 UTC (rev 19654)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ProjectRuntimeClasspathProvider.java 2010-01-05 23:15:33 UTC (rev 19655)
@@ -28,6 +28,7 @@
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jst.common.project.facet.core.IClasspathProvider;
+import org.eclipse.wst.common.project.facet.core.IProjectFacet;
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
import org.eclipse.wst.common.project.facet.core.runtime.IRuntimeComponent;
import org.eclipse.wst.server.core.IRuntime;
@@ -56,7 +57,7 @@
}
public List getClasspathEntries(final IProjectFacetVersion fv) {
- IPath path;
+ IPath path = null;
if( fv.getProjectFacet().getId().equals(ClasspathConstants.FACET_JST_JAVA) ) {
path = new Path(CONTAINER_ID);
path = path.append(rc.getProperty("id")); //$NON-NLS-1$
@@ -65,16 +66,29 @@
IClasspathEntry[] entries =
new WebtoolsProjectJBossClasspathContainer(path).getClasspathEntries();
return Arrays.asList(entries);
- } else {
+ } else if( isPrimaryFacet(fv.getProjectFacet())){
String id = rc.getProperty("id"); //$NON-NLS-1$
IPath containerPath = new Path("org.eclipse.jst.server.core.container").append("org.jboss.ide.eclipse.as.core.server.runtime.runtimeTarget"); //$NON-NLS-1$ //$NON-NLS-2$
path = containerPath.append(id);
}
-
- IClasspathEntry cpentry = JavaCore.newContainerEntry(path);
- return Collections.singletonList(cpentry);
+ if( path != null ) {
+ IClasspathEntry cpentry = JavaCore.newContainerEntry(path);
+ return Collections.singletonList(cpentry);
+ }
+ return Collections.emptyList();
}
+ // Bad name, I know, but checks if this is
+ // an ear, war, ejb, or other top level facet
+ protected boolean isPrimaryFacet(IProjectFacet facet) {
+ WebtoolsProjectJBossClasspathContainerInitializer del = new WebtoolsProjectJBossClasspathContainerInitializer();
+ return facet.equals(del.WEB_FACET)
+ || facet.equals(del.EJB_FACET)
+ || facet.equals(del.EAR_FACET)
+ || facet.equals(del.CONNECTOR_FACET)
+ || facet.equals(del.APP_CLIENT_FACET);
+ }
+
public static final class Factory implements IAdapterFactory {
private static final Class[] ADAPTER_TYPES = { IClasspathProvider.class };
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/WebtoolsProjectJBossClasspathContainerInitializer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/WebtoolsProjectJBossClasspathContainerInitializer.java 2010-01-05 20:53:24 UTC (rev 19654)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/WebtoolsProjectJBossClasspathContainerInitializer.java 2010-01-05 23:15:33 UTC (rev 19655)
@@ -48,13 +48,13 @@
public class WebtoolsProjectJBossClasspathContainerInitializer extends
ClasspathContainerInitializer implements ClasspathConstants {
- private static final IProjectFacet JST_JAVA_FACET = ProjectFacetsManager.getProjectFacet(FACET_JST_JAVA);
- private static final IProjectFacet WEB_FACET = ProjectFacetsManager.getProjectFacet(FACET_WEB);
- private static final IProjectFacet EJB_FACET = ProjectFacetsManager.getProjectFacet(FACET_EJB);
- private static final IProjectFacet EAR_FACET = ProjectFacetsManager.getProjectFacet(FACET_EAR);
- private static final IProjectFacet UTILITY_FACET = ProjectFacetsManager.getProjectFacet(FACET_UTILITY);
- private static final IProjectFacet CONNECTOR_FACET = ProjectFacetsManager.getProjectFacet(FACET_CONNECTOR);
- private static final IProjectFacet APP_CLIENT_FACET = ProjectFacetsManager.getProjectFacet(FACET_APP_CLIENT);
+ public static final IProjectFacet JST_JAVA_FACET = ProjectFacetsManager.getProjectFacet(FACET_JST_JAVA);
+ public static final IProjectFacet WEB_FACET = ProjectFacetsManager.getProjectFacet(FACET_WEB);
+ public static final IProjectFacet EJB_FACET = ProjectFacetsManager.getProjectFacet(FACET_EJB);
+ public static final IProjectFacet EAR_FACET = ProjectFacetsManager.getProjectFacet(FACET_EAR);
+ public static final IProjectFacet UTILITY_FACET = ProjectFacetsManager.getProjectFacet(FACET_UTILITY);
+ public static final IProjectFacet CONNECTOR_FACET = ProjectFacetsManager.getProjectFacet(FACET_CONNECTOR);
+ public static final IProjectFacet APP_CLIENT_FACET = ProjectFacetsManager.getProjectFacet(FACET_APP_CLIENT);
public WebtoolsProjectJBossClasspathContainerInitializer() {
14 years, 11 months
JBoss Tools SVN: r19654 - in trunk/as/plugins/org.jboss.ide.eclipse.as.ssh: src/org/jboss/ide/eclipse/as/ssh and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2010-01-05 15:53:24 -0500 (Tue, 05 Jan 2010)
New Revision: 19654
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.ssh/src/org/jboss/ide/eclipse/as/ssh/ui/wizard/
trunk/as/plugins/org.jboss.ide.eclipse.as.ssh/src/org/jboss/ide/eclipse/as/ssh/ui/wizard/SCPServerWizardFragment.java
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ssh/plugin.xml
trunk/as/plugins/org.jboss.ide.eclipse.as.ssh/src/org/jboss/ide/eclipse/as/ssh/Messages.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ssh/src/org/jboss/ide/eclipse/as/ssh/Messages.properties
trunk/as/plugins/org.jboss.ide.eclipse.as.ssh/src/org/jboss/ide/eclipse/as/ssh/server/SSHServerDelegate.java
Log:
JBIDE-5556 - wizard page for ssh server
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ssh/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ssh/plugin.xml 2010-01-05 20:44:17 UTC (rev 19653)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ssh/plugin.xml 2010-01-05 20:53:24 UTC (rev 19654)
@@ -104,5 +104,13 @@
typeIds="org.jboss.ide.eclipse.as.ssh.server.remoteServerType,org.jboss.ide.eclipse.as.ssh.server.remoteServerRuntimeType">
</image>
</extension>
+ <extension
+ point="org.eclipse.wst.server.ui.wizardFragments">
+ <fragment
+ class="org.jboss.ide.eclipse.as.ssh.ui.wizard.SCPServerWizardFragment"
+ id="org.jboss.ide.eclipse.as.ssh.server.remoteServerWizardFragment"
+ typeIds="org.jboss.ide.eclipse.as.ssh.server.remoteServerType">
+ </fragment>
+ </extension>
</plugin>
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ssh/src/org/jboss/ide/eclipse/as/ssh/Messages.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ssh/src/org/jboss/ide/eclipse/as/ssh/Messages.java 2010-01-05 20:44:17 UTC (rev 19653)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ssh/src/org/jboss/ide/eclipse/as/ssh/Messages.java 2010-01-05 20:53:24 UTC (rev 19654)
@@ -26,6 +26,8 @@
public static String SCPDeploymentDescription;
public static String EditorSetUserCommandLabel;
public static String EditorSetPasswordCommandLabel;
+ public static String SCPServerDescription;
+
static {
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ssh/src/org/jboss/ide/eclipse/as/ssh/Messages.properties
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ssh/src/org/jboss/ide/eclipse/as/ssh/Messages.properties 2010-01-05 20:44:17 UTC (rev 19653)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ssh/src/org/jboss/ide/eclipse/as/ssh/Messages.properties 2010-01-05 20:53:24 UTC (rev 19654)
@@ -8,4 +8,5 @@
EditorSetPasswordCommandLabel=Set Password
EditorSetDeployCommandLabel=Set Remote Deployment Folder
SCPDeploymentSectionTitle=SCP Deployment
-SCPDeploymentDescription=Deploy your modules via SCP file transfer
\ No newline at end of file
+SCPDeploymentDescription=Deploy your modules via SCP file transfer
+SCPServerDescription=A server which allows remote deployment via SCP
\ No newline at end of file
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ssh/src/org/jboss/ide/eclipse/as/ssh/server/SSHServerDelegate.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ssh/src/org/jboss/ide/eclipse/as/ssh/server/SSHServerDelegate.java 2010-01-05 20:44:17 UTC (rev 19653)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ssh/src/org/jboss/ide/eclipse/as/ssh/server/SSHServerDelegate.java 2010-01-05 20:53:24 UTC (rev 19654)
@@ -16,7 +16,7 @@
public class SSHServerDelegate extends DeployableServer {
public SSHServerDelegate() {
- // TODO Auto-generated constructor stub
+ super();
}
public IJBossServerRuntime getRuntime() {
@@ -26,8 +26,26 @@
public String getUsername() {
return getAttribute(ISSHDeploymentConstants.USERNAME, (String)null);
}
-
public String getPassword() {
return getAttribute(ISSHDeploymentConstants.PASSWORD, (String)null);
}
+ public String getHostsFile() {
+ return getAttribute(ISSHDeploymentConstants.HOSTS_FILE, (String)null);
+ }
+ public String getDeployFolder() {
+ return getAttribute(ISSHDeploymentConstants.DEPLOY_DIRECTORY, (String)null);
+ }
+
+ public void setUsername(String user) {
+ setAttribute(ISSHDeploymentConstants.USERNAME, user);
+ }
+ public void setPassword(String pass) {
+ setAttribute(ISSHDeploymentConstants.PASSWORD, pass);
+ }
+ public void setHostsFile(String file) {
+ setAttribute(ISSHDeploymentConstants.HOSTS_FILE, file);
+ }
+ public void setDeployFolder(String folder) {
+ setAttribute(ISSHDeploymentConstants.DEPLOY_DIRECTORY, folder);
+ }
}
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.ssh/src/org/jboss/ide/eclipse/as/ssh/ui/wizard/SCPServerWizardFragment.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ssh/src/org/jboss/ide/eclipse/as/ssh/ui/wizard/SCPServerWizardFragment.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ssh/src/org/jboss/ide/eclipse/as/ssh/ui/wizard/SCPServerWizardFragment.java 2010-01-05 20:53:24 UTC (rev 19654)
@@ -0,0 +1,179 @@
+package org.jboss.ide.eclipse.as.ssh.ui.wizard;
+
+import java.io.File;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.dialogs.IMessageProvider;
+import org.eclipse.jst.j2ee.model.internal.validation.ValidateBMPBean;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.wst.server.core.IServerWorkingCopy;
+import org.eclipse.wst.server.core.TaskModel;
+import org.eclipse.wst.server.ui.internal.ImageResource;
+import org.eclipse.wst.server.ui.wizard.IWizardHandle;
+import org.eclipse.wst.server.ui.wizard.WizardFragment;
+import org.jboss.ide.eclipse.as.core.util.ServerUtil;
+import org.jboss.ide.eclipse.as.ssh.Messages;
+import org.jboss.ide.eclipse.as.ssh.server.SSHServerDelegate;
+
+public class SCPServerWizardFragment extends WizardFragment {
+ private IWizardHandle handle;
+ private Text userText, passText, deployText, hostsFileText;
+ private ModifyListener listener;
+ private SelectionListener browseHostsButtonListener;
+ private Button browseHostsFileButton;
+ private String user, pass, deploy, hostFile;
+
+ public SCPServerWizardFragment() {
+ super();
+ }
+
+ public Composite createComposite(Composite parent, IWizardHandle handle) {
+ this.handle = handle;
+ handle.setDescription(Messages.SCPServerDescription);
+ handle.setImageDescriptor(ImageResource.getImageDescriptor(ImageResource.IMG_WIZBAN_NEW_SERVER));
+
+ Composite main = new Composite(parent, SWT.NONE);
+ main.setLayout(new FormLayout());
+ addWidgets(main);
+ validate();
+ return main;
+ }
+
+ protected void addWidgets(Composite composite) {
+ composite.setLayout(new FormLayout());
+
+ Composite inner = new Composite(composite, SWT.NONE);
+ inner.setLayout(new GridLayout(3, false));
+
+ FormData innerData = new FormData();
+ innerData.top = new FormAttachment(0, 5);
+ innerData.left = new FormAttachment(0, 5);
+ innerData.right = new FormAttachment(100, -5);
+ inner.setLayoutData(innerData);
+
+ GridData textData = new GridData(SWT.LEFT, SWT.CENTER, true, false, 2, 1);
+ textData.widthHint = 300;
+
+ Label label = new Label(inner, SWT.NONE);
+ label.setText(Messages.DeployRootFolder);
+ deployText = new Text(inner, SWT.BORDER);
+ deployText.setText("/home/rob/deployFolder");
+ listener = new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ updateValues();
+ }
+ };
+ deployText.addModifyListener(listener);
+ deployText.setEnabled(true);
+ deployText.setLayoutData(textData);
+
+ Label userLabel = new Label(inner, SWT.NONE);
+ userLabel.setText(Messages.UserLabel);
+ userText = new Text(inner, SWT.BORDER);
+ userText.setText("username");
+ userText.addModifyListener(listener);
+ userText.setEnabled(true);
+ userText.setLayoutData(textData);
+
+
+ Label passLabel = new Label(inner, SWT.NONE);
+ passLabel.setText(Messages.PassLabel);
+ passText = new Text(inner, SWT.BORDER);
+ passText.setText("password");
+ passText.addModifyListener(listener);
+ passText.setEnabled(true);
+ passText.setLayoutData(textData);
+
+ Label hostsLabel = new Label(inner, SWT.NONE);
+ hostsLabel.setText(Messages.HostsLabel);
+ Composite hostsFileComposite = new Composite(inner, SWT.NONE);
+ hostsFileComposite.setLayoutData(textData);
+ hostsFileComposite.setLayout(new GridLayout(2,false));
+
+ hostsFileText = new Text(hostsFileComposite, SWT.BORDER);
+ hostsFileText.setText("/home/username/.ssh/known_hosts");
+ hostsFileText.addModifyListener(listener);
+ hostsFileText.setEnabled(true);
+ GridData hostsFileData = new GridData(SWT.LEFT, SWT.CENTER, true, false);
+ hostsFileData.widthHint = 200;
+ hostsFileData.grabExcessHorizontalSpace = true;
+ hostsFileText.setLayoutData(hostsFileData);
+
+ browseHostsFileButton = new Button(hostsFileComposite, SWT.PUSH);
+ browseHostsFileButton.setText(Messages.browse);
+ browseHostsButtonListener = new SelectionListener() {
+ public void widgetSelected(SelectionEvent e) {
+ browseForHostsSelected();
+ }
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ };
+ browseHostsFileButton.addSelectionListener(browseHostsButtonListener);
+ }
+
+ protected void browseForHostsSelected() {
+ FileDialog d = new FileDialog(new Shell());
+ IPath p = ServerUtil.makeGlobal(null, new Path(hostsFileText.getText()));
+ d.setFilterPath(p.toString());
+ String x = d.open();
+ if (x != null) {
+ hostsFileText.setText(x);
+ }
+ }
+
+ protected void updateValues() {
+ user = userText.getText();
+ pass = passText.getText();
+ deploy = deployText.getText();
+ hostFile = hostsFileText.getText();
+ validate();
+ }
+
+ public void enter() {
+ }
+ public void exit() {
+ }
+ public boolean hasComposite() {
+ return true;
+ }
+
+ protected void validate() {
+ if( hostFile == null || !(new File(hostFile).exists()) || !(new File(hostFile).isFile()))
+ handle.setMessage("Host file must exist", IMessageProvider.ERROR);
+ else
+ handle.setMessage(null, IMessageProvider.NONE);
+ handle.update();
+ }
+
+ public boolean isComplete() {
+ return handle.getMessageType() == IMessageProvider.NONE;
+ }
+
+ public void performFinish(IProgressMonitor monitor) throws CoreException {
+ IServerWorkingCopy serverWC = (IServerWorkingCopy) getTaskModel().getObject(TaskModel.TASK_SERVER);
+ SSHServerDelegate server = (SSHServerDelegate)serverWC.loadAdapter(SSHServerDelegate.class, new NullProgressMonitor());
+ server.setUsername(user); //$NON-NLS-1$
+ server.setPassword(pass); //$NON-NLS-1$
+ server.setHostsFile(hostFile);
+ server.setDeployFolder(deploy);
+ }
+}
14 years, 11 months
JBoss Tools SVN: r19653 - trunk/bpel/releng.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-01-05 15:44:17 -0500 (Tue, 05 Jan 2010)
New Revision: 19653
Modified:
trunk/bpel/releng/build.properties
Log:
re-enable tests
Modified: trunk/bpel/releng/build.properties
===================================================================
--- trunk/bpel/releng/build.properties 2010-01-05 19:42:42 UTC (rev 19652)
+++ trunk/bpel/releng/build.properties 2010-01-05 20:44:17 UTC (rev 19653)
@@ -12,8 +12,8 @@
mainFeatureToBuildID=org.jboss.tools.bpel.sdk.feature
testFeatureToBuildID=org.jboss.tools.bpel.tests.feature
-#build.steps=buildUpdate,buildTests,generateDigests,test,publish,cleanup
-build.steps=buildUpdate,generateDigests,publish,cleanup
+build.steps=buildUpdate,buildTests,generateDigests,test,publish,cleanup
+#build.steps=buildUpdate,generateDigests,publish,cleanup
JAVA14_HOME=${JAVA_HOME}
JAVA50_HOME=${JAVA_HOME}
14 years, 11 months
JBoss Tools SVN: r19652 - in trunk: jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types and 12 other directories.
by jbosstools-commits@lists.jboss.org
Author: vpakan(a)redhat.com
Date: 2010-01-05 14:42:42 -0500 (Tue, 05 Jan 2010)
New Revision: 19652
Added:
trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/.classpath
trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/.project
trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/META-INF/
trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/META-INF/MANIFEST.MF
trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/bin/
trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/build.properties
trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/resources/
trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/resources/project.properties
trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/
trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/
trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/
trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/
trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/
trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/
trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/
trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/
trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/Activator.java
trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/StrutsAllBotTests.java
trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/smoke/
trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/smoke/CreateNewStrutsProjectTest.java
Modified:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTTestExt.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/EntityType.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/ViewType.java
Log:
Added SWTBot tests for Struts
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java 2010-01-05 19:36:48 UTC (rev 19651)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java 2010-01-05 19:42:42 UTC (rev 19652)
@@ -15,6 +15,7 @@
import static org.junit.Assert.fail;
import java.io.File;
+import java.util.Iterator;
import org.apache.log4j.Logger;
import org.eclipse.swt.widgets.Shell;
@@ -23,7 +24,10 @@
import org.eclipse.swtbot.eclipse.finder.waits.Conditions;
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEclipseEditor;
import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.hamcrest.Matcher;
import org.jboss.tools.ui.bot.ext.entity.JavaClassEntity;
@@ -32,6 +36,7 @@
import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.jboss.tools.ui.bot.ext.types.PerspectiveType;
import org.jboss.tools.ui.bot.ext.types.ViewType;
+import org.jboss.tools.ui.bot.ext.types.IDELabel.PreferencesDialog;
/**
* Provides Eclipse common operation based on SWTBot element operations
@@ -238,13 +243,23 @@
*/
public void createNew(EntityType entityType) {
- String groupLabel = entityType.getGroupLabel();
- String entityLabel = entityType.getEntityLabel();
-
bot.menu(IDELabel.Menu.FILE).menu(IDELabel.Menu.NEW).menu(IDELabel.Menu.OTHER).click();
waitForShell(IDELabel.Shell.NEW);
-
- bot.tree().expandNode(groupLabel).select(entityLabel);
+
+ String entityLabel = entityType.getEntityLabel();
+ SWTBotTree tree = bot.tree();
+ Iterator<String> itGroupsNodes = entityType.getGroupsLabels().iterator();
+ // if there are group labels defined expand groups nodes
+ if (itGroupsNodes.hasNext()){
+ SWTBotTreeItem groupTreeItem = tree.expandNode(itGroupsNodes.next());
+ while (itGroupsNodes.hasNext()){
+ groupTreeItem = groupTreeItem.expandNode(itGroupsNodes.next());
+ }
+ groupTreeItem.select(entityLabel);
+ }
+ else{
+ tree.select(entityLabel);
+ }
bot.button(IDELabel.Button.NEXT).click();
}
@@ -324,5 +339,57 @@
if (save)
editor.save();
}
-
+ /**
+ * Define new Server Runtime only if it's not specified yet
+ * @param runtimeName
+ * @param runtimeGroup
+ * @param runtimeType
+ * @param runtimeHomeDir
+ */
+ public void addServerRuntime (String runtimeName, String runtimeGroup,
+ String runtimeType, String runtimeHomeDir){
+
+ bot.menu(IDELabel.Menu.WINDOW).menu(IDELabel.Menu.PREFERENCES).click();
+ bot.shell(IDELabel.Shell.PREFERENCES).activate();
+ bot.tree().expandNode(IDELabel.PreferencesDialog.SERVER_GROUP)
+ .select(PreferencesDialog.RUNTIME_ENVIRONMENTS);
+ SWTBotTable tbRuntimeEnvironments = bot.table();
+ boolean createRuntime = true;
+ // first check if Environment doesn't exist
+ int numRows = tbRuntimeEnvironments.rowCount();
+ if (numRows > 0){
+ int currentRow = 0;
+ while (createRuntime && numRows < currentRow){
+ if (tbRuntimeEnvironments.getTableItem(currentRow).getText(0).equalsIgnoreCase(runtimeName)){
+ createRuntime = false;
+ }
+ else {
+ currentRow++;
+ }
+ }
+ }
+ // create Server Runtime
+ if (createRuntime){
+ bot.button(IDELabel.Button.ADD).click();
+ bot.shell(IDELabel.Shell.NEW_SERVER_RUNTIME_ENVIRONMENT).activate();
+ bot.tree().expandNode(runtimeGroup).select(runtimeType);
+ bot.button("Next >").click();
+ bot.textWithLabel(IDELabel.JBossServerRuntimeDialog.NAME).setText(runtimeName);
+ bot.textWithLabel(IDELabel.JBossServerRuntimeDialog.HOME_DIRECTORY).setText(runtimeHomeDir);
+ bot.button(IDELabel.Button.FINISH).click();
+ bot.button(IDELabel.Button.OK).click();
+ }
+
+ }
+
+ public static boolean treeContainsItemWithLabel(SWTBotTree tree, String itemLabel){
+ boolean containsItem = false;
+ try {
+ tree.getTreeItem(itemLabel);
+ containsItem = true;
+ } catch (WidgetNotFoundException e) {
+ }
+ return containsItem;
+ }
+
}
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTTestExt.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTTestExt.java 2010-01-05 19:36:48 UTC (rev 19651)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTTestExt.java 2010-01-05 19:42:42 UTC (rev 19652)
@@ -30,7 +30,7 @@
// Views
public static final PackageExplorer packageExplorer = new PackageExplorer();
- private static Properties properties;
+ public static Properties properties;
/**
* Get properties for hibernate tests
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/EntityType.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/EntityType.java 2010-01-05 19:36:48 UTC (rev 19651)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/EntityType.java 2010-01-05 19:42:42 UTC (rev 19652)
@@ -12,25 +12,28 @@
import static org.junit.Assert.fail;
+import java.util.LinkedList;
+import java.util.List;
+
/**
* Provides functionality for evaluation particular entity location like projects types, file types, etc.
* @author jpeterka
*/
public enum EntityType {
HIBERNATE_MAPPING_FILE, JAVA_PROJECT, JAVA_CLASS, HIBERNATE_REVERSE_FILE, HIBERNATE_CONSOLE,
- HIBERNATE_CONFIGURATION_FILE;
+ HIBERNATE_CONFIGURATION_FILE, STRUTS_PROJECT;
- public String getGroupLabel() {
- String groupLabel = "";
+ public List<String> getGroupsLabels() {
+ List<String> groupLabel = new LinkedList<String>();
-
switch (this) {
- case HIBERNATE_MAPPING_FILE: groupLabel = IDELabel.EntityGroup.HIBERNATE; break;
- case JAVA_PROJECT: groupLabel = IDELabel.EntityGroup.JAVA; break;
- case JAVA_CLASS: groupLabel = IDELabel.EntityGroup.JAVA; break;
- case HIBERNATE_REVERSE_FILE: groupLabel = IDELabel.EntityGroup.HIBERNATE; break;
- case HIBERNATE_CONFIGURATION_FILE: groupLabel = IDELabel.EntityGroup.HIBERNATE; break;
- case HIBERNATE_CONSOLE: groupLabel = IDELabel.EntityGroup.HIBERNATE; break;
+ case HIBERNATE_MAPPING_FILE: groupLabel.add(IDELabel.EntityGroup.HIBERNATE); break;
+ case JAVA_PROJECT: groupLabel.add(IDELabel.EntityGroup.JAVA); break;
+ case JAVA_CLASS: groupLabel.add(IDELabel.EntityGroup.JAVA); break;
+ case HIBERNATE_REVERSE_FILE: groupLabel.add(IDELabel.EntityGroup.HIBERNATE); break;
+ case HIBERNATE_CONFIGURATION_FILE: groupLabel.add(IDELabel.EntityGroup.HIBERNATE); break;
+ case HIBERNATE_CONSOLE: groupLabel.add(IDELabel.EntityGroup.HIBERNATE); break;
+ case STRUTS_PROJECT: groupLabel.add(IDELabel.EntityGroup.JBOSS_TOOLS_WEB); groupLabel.add(IDELabel.EntityGroup.STRUTS);break;
default: fail("Unknown Entity Type");
}
@@ -51,6 +54,7 @@
case HIBERNATE_CONSOLE: entityLabel = IDELabel.EntityLabel.HIBERNATE_CONSOLE; break;
case JAVA_PROJECT: entityLabel = IDELabel.EntityLabel.JAVA_PROJECT; break;
case JAVA_CLASS: entityLabel = IDELabel.EntityLabel.JAVA_CLASS; break;
+ case STRUTS_PROJECT: entityLabel = IDELabel.EntityLabel.STRUTS_PROJECT; break;
default: fail("Unknown Entity Type");
}
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java 2010-01-05 19:36:48 UTC (rev 19651)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java 2010-01-05 19:42:42 UTC (rev 19652)
@@ -54,6 +54,8 @@
public static final String JBT_REMOVE_JSF_CAPABILITIES = "Remove JSF Capabilities";
public static final String START = "Start";
public static final String STOP = "Stop";
+ public static final String STRUTS_PROJECT = "Struts Project";
+ public static final String PREFERENCES = "Preferences";
}
@@ -68,6 +70,7 @@
public static final String CLOSE = "Close";
public static final String RUN = "Run";
public static final String APPLY = "Apply";
+ public static final String ADD = "Add...";
}
public class Shell {
@@ -86,12 +89,18 @@
public static final String IMPORT_JSF_PROJECT = "Import JSF Project";
public static final String IMPORT = "Import";
public static final String DELETE_SERVER = "Delete Server";
+ public static final String NEW_STRUTS_PROJECT = "New Struts Project";
+ public static final String PREFERENCES = "Preferences";
+ public static final String NEW_SERVER_RUNTIME_ENVIRONMENT = "New Server Runtime Environment";
+ public static final String OPEN_ASSOCIATED_PERSPECTIVE = "Open Associated Perspective?";
}
public class EntityGroup {
public static final String HIBERNATE = "Hibernate";
public static final String JAVA = "Java";
public static final String SEAM = "Seam";
+ public static final String STRUTS = "Struts";
+ public static final String JBOSS_TOOLS_WEB = "JBoss Tools Web";
}
public class EntityLabel {
@@ -102,6 +111,7 @@
public static final String JAVA_PROJECT = "Java Project";
public static final String SEAM_PROJECT = "Seam Web Project";
public static final String HIBERNATE_CONFIGURATION_FILE = "Hibernate Configuration File (cfg.xml)";
+ public static final String STRUTS_PROJECT = "Struts Project";
}
public class JavaProjectWizard {
@@ -125,6 +135,7 @@
public static final String PACKAGE_EXPLORER = "Package Explorer";
public static final String DATA_SOURCE_EXPLORER = "Data Source Explorer";
public static final String SERVERS = "Servers";
+ public static final String WEB_PROJECTS = "Web Projects";
}
public class ViewGroup {
@@ -132,6 +143,7 @@
public static final String JAVA = "Java";
public static final String DATA_MANAGEMENT = "Data Management";
public static final String SERVER = "Server";
+ public static final String JBOSS_TOOLS_WEB = "JBoss Tools Web";
}
public class SelectPerspectiveDialog {
@@ -246,4 +258,37 @@
public static final String CHOICE_LIST_IS_EMPTY = "Choice list is empty.";
}
+
+ public class NewStrutsProjectDialog{
+
+ public static final String NAME = "Project Name*";
+ public static final String TEMPLATE = "Template*";
+ public static final String TEMPLATE_KICK_START = "KickStart";
+
+ }
+
+ public static class PreferencesDialog {
+
+ public static final String SERVER_GROUP = "Server";
+ public static final String RUNTIME_ENVIRONMENTS = "Runtime Environments";
+
+ }
+
+ public static class JBossServerRuntimeDialog {
+
+ public static final String NAME = "Name";
+ public static final String HOME_DIRECTORY = "Home Directory";
+
+ }
+ public static final class ServerGroup {
+
+ public static final String JBOSS_EAP_4_3 = "JBoss Enterprise Middleware";
+
+ }
+ public static final class ServerType {
+
+ public static final String JBOSS_EAP_4_3 = "JBoss Enterprise Application Platform 4.3 Runtime";
+
+ }
+
}
Modified: trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/ViewType.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/ViewType.java 2010-01-05 19:36:48 UTC (rev 19651)
+++ trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/ViewType.java 2010-01-05 19:42:42 UTC (rev 19652)
@@ -18,7 +18,7 @@
*
*/
public enum ViewType {
- PACKAGE_EXPLORER, PROJECT_EXPLORER, WELCOME, DATA_SOURCE_EXPLORER,SERVERS;
+ PACKAGE_EXPLORER, PROJECT_EXPLORER, WELCOME, DATA_SOURCE_EXPLORER,SERVERS,WEB_PROJECTS;
public String getGroupLabel() {
@@ -28,6 +28,7 @@
case PACKAGE_EXPLORER: viewLabel = IDELabel.ViewGroup.JAVA; break;
case DATA_SOURCE_EXPLORER: viewLabel = IDELabel.ViewGroup.DATA_MANAGEMENT; break;
case SERVERS: viewLabel = IDELabel.ViewGroup.SERVER; break;
+ case WEB_PROJECTS: viewLabel = IDELabel.ViewGroup.JBOSS_TOOLS_WEB; break;
default: fail("Unknown View Type");
}
return viewLabel;
@@ -40,6 +41,7 @@
case PACKAGE_EXPLORER: viewLabel = IDELabel.View.PACKAGE_EXPLORER; break;
case DATA_SOURCE_EXPLORER: viewLabel = IDELabel.View.DATA_SOURCE_EXPLORER; break;
case SERVERS: viewLabel = IDELabel.View.SERVERS; break;
+ case WEB_PROJECTS: viewLabel = IDELabel.View.WEB_PROJECTS; break;
default: fail("Unknown View Type");
}
return viewLabel;
Added: trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/.classpath
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/.classpath (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/.classpath 2010-01-05 19:42:42 UTC (rev 19652)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="resources"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Property changes on: trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/.classpath
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/.project
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/.project (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/.project 2010-01-05 19:42:42 UTC (rev 19652)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.struts.ui.bot.test</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Property changes on: trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/.project
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/META-INF/MANIFEST.MF (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/META-INF/MANIFEST.MF 2010-01-05 19:42:42 UTC (rev 19652)
@@ -0,0 +1,19 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Struts UI SWTBot Tests
+Bundle-SymbolicName: org.jboss.tools.struts.ui.bot.test
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.jboss.tools.struts.ui.bot.test.Activator
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.jboss.tools.jst.ui.bot.test;bundle-version="1.0.0",
+ org.eclipse.swtbot.eclipse.core;bundle-version="2.0.0",
+ org.eclipse.swtbot.eclipse.finder;bundle-version="2.0.0",
+ org.eclipse.swtbot.eclipse.spy;bundle-version="2.0.0",
+ org.eclipse.swtbot.eclipse.ui;bundle-version="2.0.0",
+ org.eclipse.swtbot.swt.finder;bundle-version="2.0.0",
+ org.junit4;bundle-version="4.5.0",
+ org.jboss.tools.ui.bot.ext;bundle-version="1.0.0"
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-Vendor: JBoss by Red Hat
Property changes on: trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/META-INF/MANIFEST.MF
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/build.properties
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/build.properties (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/build.properties 2010-01-05 19:42:42 UTC (rev 19652)
@@ -0,0 +1,4 @@
+source.. = src/,resources/
+output.. = bin/
+bin.includes = META-INF/,\
+ .
Property changes on: trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/build.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/resources/project.properties
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/resources/project.properties (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/resources/project.properties 2010-01-05 19:42:42 UTC (rev 19652)
@@ -0,0 +1 @@
+JBossEap4.3Home=/opt/jboss-eap-4.3/jboss-as
Property changes on: trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/resources/project.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/Activator.java
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/Activator.java (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/Activator.java 2010-01-05 19:42:42 UTC (rev 19652)
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.struts.ui.bot.test;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ *
+ * @author Vladimir Pakan
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.jboss.tools.struts.ui.bot.test";
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
Property changes on: trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/Activator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/StrutsAllBotTests.java
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/StrutsAllBotTests.java (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/StrutsAllBotTests.java 2010-01-05 19:42:42 UTC (rev 19652)
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.struts.ui.bot.test;
+
+import org.jboss.tools.struts.ui.bot.test.smoke.CreateNewStrutsProjectTest;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+
+/**
+ *
+ * This is struts swtbot testcase for JBoss Tools.
+ *
+ * @author Vladimir Pakan
+ *
+ */
+(a)RunWith(Suite.class)
+@SuiteClasses( {CreateNewStrutsProjectTest.class})
+public class StrutsAllBotTests extends SWTTestExt {
+ @BeforeClass
+ public static void setUp() {
+ properties = util.loadProperties(Activator.PLUGIN_ID);
+ eclipse.closeView(IDELabel.View.WELCOME);
+ }
+
+ @AfterClass
+ public static void tearDown() {
+ // Ready for later usage
+ }
+}
\ No newline at end of file
Property changes on: trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/StrutsAllBotTests.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/smoke/CreateNewStrutsProjectTest.java
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/smoke/CreateNewStrutsProjectTest.java (rev 0)
+++ trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/smoke/CreateNewStrutsProjectTest.java 2010-01-05 19:42:42 UTC (rev 19652)
@@ -0,0 +1,62 @@
+ /*******************************************************************************
+ * Copyright (c) 2007-2009 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.struts.ui.bot.test.smoke;
+
+import static org.junit.Assert.assertTrue;
+
+import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
+import org.jboss.tools.ui.bot.ext.SWTEclipseExt;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.types.EntityType;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
+import org.jboss.tools.ui.bot.ext.types.ViewType;
+import org.junit.Test;
+import org.jboss.tools.struts.ui.bot.test.StrutsAllBotTests;
+/**
+ * Test creating new Struts Project
+ * @author Vladimir Pakan
+ *
+ */
+public class CreateNewStrutsProjectTest extends SWTTestExt{
+
+ public static final String STRUTS_PROJECT_NAME = "strutsTest";
+
+ @Test
+ public void testCreateNewStrutsProject() {
+
+ // Test create new Struts Project
+ eclipse.showView(ViewType.WEB_PROJECTS);
+ eclipse.addServerRuntime(IDELabel.ServerRuntimeName.JBOSS_EAP_4_3,
+ IDELabel.ServerGroup.JBOSS_EAP_4_3,
+ IDELabel.ServerType.JBOSS_EAP_4_3,
+ StrutsAllBotTests.getProperty("JBossEap4.3Home"));
+ eclipse.createNew(EntityType.STRUTS_PROJECT);
+ bot.shell(IDELabel.Shell.NEW_STRUTS_PROJECT).activate();
+ bot.textWithLabel(IDELabel.NewStrutsProjectDialog.NAME).setText(STRUTS_PROJECT_NAME);
+ bot.comboBoxWithLabel(IDELabel.NewStrutsProjectDialog.TEMPLATE).setSelection(IDELabel.NewStrutsProjectDialog.TEMPLATE_KICK_START);
+ bot.button(IDELabel.Button.NEXT).click();
+ bot.button(IDELabel.Button.NEXT).click();
+ bot.button(IDELabel.Button.FINISH).click();
+ // if Open Associated Perspective Shell is opened close it
+ try{
+ bot.shell(IDELabel.Shell.OPEN_ASSOCIATED_PERSPECTIVE).activate();
+ bot.button(IDELabel.Button.NO).click();
+ } catch (WidgetNotFoundException wnfe){
+ // do nothing
+ }
+
+ assertTrue("Project "+ STRUTS_PROJECT_NAME + " was not created properly.",
+ SWTEclipseExt.treeContainsItemWithLabel(bot.viewByTitle(IDELabel.View.WEB_PROJECTS).bot().tree(),STRUTS_PROJECT_NAME));
+
+ }
+
+}
Property changes on: trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/smoke/CreateNewStrutsProjectTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
14 years, 11 months
JBoss Tools SVN: r19651 - trunk/struts/tests.
by jbosstools-commits@lists.jboss.org
Author: vpakan(a)redhat.com
Date: 2010-01-05 14:36:48 -0500 (Tue, 05 Jan 2010)
New Revision: 19651
Added:
trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/
Log:
Added SWTBot tests for Struts
14 years, 11 months
JBoss Tools SVN: r19650 - in trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test: hbmexporter and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2010-01-05 13:08:51 -0500 (Tue, 05 Jan 2010)
New Revision: 19650
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/JPAMapMockTests.java
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/JPAMapTest.java
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/hbmexporter/HbmExporterTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5159 - first step implementation
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/JPAMapMockTests.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/JPAMapMockTests.java 2010-01-05 18:08:29 UTC (rev 19649)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/JPAMapMockTests.java 2010-01-05 18:08:51 UTC (rev 19650)
@@ -88,7 +88,7 @@
context.checking(new Expectations() {{
exactly(1).of(allEntitiesProcessor).modify(new HashMap<String, EntityInfo>(), true, selection2Update);
}});
- jpaMapToolActor.updateSelected();
+ jpaMapToolActor.updateSelected(Integer.MAX_VALUE);
context.assertIsSatisfied();
jpaMapToolActor.setSelection(null);
@@ -105,7 +105,7 @@
allowing(allEntitiesInfoCollector).initCollector();
inSequence(sequence);
- allowing(allEntitiesInfoCollector).collect(compilationUnit);
+ allowing(allEntitiesInfoCollector).collect(compilationUnit, Integer.MAX_VALUE);
inSequence(sequence);
allowing(allEntitiesInfoCollector).resolveRelations();
@@ -138,7 +138,7 @@
exactly(1).of(allEntitiesProcessor).modify(null, true, selection2Update);
}});
- jpaMapToolActor.updateSelected();
+ jpaMapToolActor.updateSelected(Integer.MAX_VALUE);
context.assertIsSatisfied();
/** /
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/JPAMapTest.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/JPAMapTest.java 2010-01-05 18:08:29 UTC (rev 19649)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/JPAMapTest.java 2010-01-05 18:08:51 UTC (rev 19650)
@@ -130,12 +130,12 @@
assertNotNull(icu3);
assertNotNull(icu4);
collector.initCollector();
- collector.collect(icu);
- collector.collect(icu2);
- collector.collect(icu3);
- collector.collect(icu4);
+ collector.collect(icu, Integer.MAX_VALUE);
+ collector.collect(icu2, Integer.MAX_VALUE);
+ collector.collect(icu3, Integer.MAX_VALUE);
+ collector.collect(icu4, Integer.MAX_VALUE);
if (icu44 != null) {
- collector.collect(icu44);
+ collector.collect(icu44, Integer.MAX_VALUE);
}
collector.resolveRelations();
processor.setEnableOptLock(true);
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/hbmexporter/HbmExporterTest.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/hbmexporter/HbmExporterTest.java 2010-01-05 18:08:29 UTC (rev 19649)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/hbmexporter/HbmExporterTest.java 2010-01-05 18:08:51 UTC (rev 19650)
@@ -84,7 +84,7 @@
selectionCU.add(icu);
}
ConfigurationActor actor = new ConfigurationActor(selectionCU);
- Map<IJavaProject, Configuration> configurations = actor.createConfigurations();
+ Map<IJavaProject, Configuration> configurations = actor.createConfigurations(Integer.MAX_VALUE);
assertEquals(1, configurations.size());
Configuration config = configurations.get(project.getIJavaProject());
assertNotNull(config);
14 years, 11 months
JBoss Tools SVN: r19649 - in trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui: internal/jpa/collect and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2010-01-05 13:08:29 -0500 (Tue, 05 Jan 2010)
New Revision: 19649
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActionDelegate.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActionPulldownDelegate.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/AllEntitiesInfoCollector.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/EntitiesSource.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/HibernateJPAWizard.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/HibernateJPAWizardDataFactory.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/AddRemoveTableComposite.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/ConfigurationActor.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/NewHibernateMappingElementsSelectionPage2.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/NewHibernateMappingFileWizard.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5159 - first step implementation
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActionDelegate.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActionDelegate.java 2010-01-05 18:07:49 UTC (rev 19648)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActionDelegate.java 2010-01-05 18:08:29 UTC (rev 19649)
@@ -45,7 +45,7 @@
}
public void run(IAction action) {
- actor.updateSelected();
+ actor.updateSelected(Integer.MAX_VALUE);
//actor.updateOpen();
}
@@ -63,7 +63,7 @@
}
public Object execute(ExecutionEvent event) throws ExecutionException {
- actor.updateSelected();
+ actor.updateSelected(Integer.MAX_VALUE);
//actor.updateOpen();
return null;
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActionPulldownDelegate.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActionPulldownDelegate.java 2010-01-05 18:07:49 UTC (rev 19648)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActionPulldownDelegate.java 2010-01-05 18:08:29 UTC (rev 19649)
@@ -93,7 +93,7 @@
IAction action = new Action(JdtUiMessages.JPAMapToolActionPulldownDelegate_menu) {
public void run() {
//actor.updateOpen();
- actor.updateSelected();
+ actor.updateSelected(Integer.MAX_VALUE);
}
};
addToMenu(menu, action, -1);
@@ -146,7 +146,7 @@
public void runWithEvent(IAction action, Event event) {
//actor.updateOpen();
- actor.updateSelected();
+ actor.updateSelected(Integer.MAX_VALUE);
}
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java 2010-01-05 18:07:49 UTC (rev 19648)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java 2010-01-05 18:08:29 UTC (rev 19649)
@@ -112,14 +112,15 @@
/**
* updates selected compilation units collection
+ * @param depth - process depth
*/
- public void updateSelected() {
+ public void updateSelected(int depth) {
if (selection != null) {
updateSelectedItems(selection);
selection = null;
} else {
if (getSelectionCUSize() == 0) {
- updateOpen();
+ updateOpen(depth);
return;
}
}
@@ -131,7 +132,7 @@
collector.initCollector();
while (it.hasNext()) {
ICompilationUnit cu = it.next();
- collector.collect(cu);
+ collector.collect(cu, depth);
}
collector.resolveRelations();
if (collector.getNonInterfaceCUNumber() > 0) {
@@ -159,8 +160,9 @@
/**
* update compilation unit of currently opened editor
+ * @param depth - process depth
*/
- public void updateOpen() {
+ public void updateOpen(int depth) {
IWorkbenchWindow activeWorkbenchWindow = getActiveWorkbenchWindow();
if (activeWorkbenchWindow == null) {
return;
@@ -177,7 +179,7 @@
//IJavaProject javaProject = cu.getJavaProject();
//collector.initCollector(javaProject);
collector.initCollector();
- collector.collect(cu);
+ collector.collect(cu, depth);
collector.resolveRelations();
if (collector.getNonInterfaceCUNumber() > 0) {
//processor.modify(javaProject, collector.getMapCUs_Info(), true, createSelection2Update());
@@ -192,7 +194,7 @@
}
public void makePersistent(ICompilationUnit cu) throws CoreException {
- collector.collect(cu);
+ collector.collect(cu, Integer.MAX_VALUE);
}
/**
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/AllEntitiesInfoCollector.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/AllEntitiesInfoCollector.java 2010-01-05 18:07:49 UTC (rev 19648)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/AllEntitiesInfoCollector.java 2010-01-05 18:08:29 UTC (rev 19649)
@@ -671,9 +671,9 @@
* @param fullyQualifiedName of startup point entity fully qualified name
* example: "org.hibernate.eclipse.jdt.ui.internal.jpa.collect.AllEntitiesInfoCollector"
*/
- public void collect(String fullyQualifiedName, String projectName) {
+ public void collect(String fullyQualifiedName, String projectName, int depth) {
- if (fullyQualifiedName == null) {
+ if (fullyQualifiedName == null || depth < 0) {
return;
}
if (mapCUs_Info.containsKey(projectName + "/" + fullyQualifiedName)) { //$NON-NLS-1$
@@ -681,18 +681,19 @@
}
final IJavaProject javaProject = Utils.findJavaProject(projectName);
ICompilationUnit icu = Utils.findCompilationUnit(javaProject, fullyQualifiedName);
- collect(icu);
+ collect(icu, depth);
}
/**
* start to collect information from particular entity class and
* its dependencies
* @param icu - startup point entity compilation unit
+ * @param depth - process depth
*/
@SuppressWarnings("unchecked")
- public void collect(ICompilationUnit icu) {
+ public void collect(ICompilationUnit icu, int depth) {
- if (icu == null) {
+ if (icu == null || depth < 0) {
return;
}
org.eclipse.jdt.core.dom.CompilationUnit cu = Utils.getCompilationUnit(icu, true);
@@ -741,10 +742,12 @@
result.adjustParameters();
result.setJavaProjectName(projectName);
mapCUs_Info.put(projectName + "/" + fullyQualifiedName, result); //$NON-NLS-1$
- Iterator<String> itDep = result.getDependences();
- while (itDep.hasNext()) {
- String fullyQualifiedNameTmp = itDep.next();
- collect(fullyQualifiedNameTmp, projectName);
+ if (depth > 0) {
+ Iterator<String> itDep = result.getDependences();
+ while (itDep.hasNext()) {
+ String fullyQualifiedNameTmp = itDep.next();
+ collect(fullyQualifiedNameTmp, projectName, depth - 1);
+ }
}
}
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/EntitiesSource.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/EntitiesSource.java 2010-01-05 18:07:49 UTC (rev 19648)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/EntitiesSource.java 2010-01-05 18:08:29 UTC (rev 19649)
@@ -46,6 +46,10 @@
addRemoveTableComposite.getTableViewer().setInput(selection.toArray());
setControl(addRemoveTableComposite);
}
+
+ public int getProcessDepth() {
+ return addRemoveTableComposite.getProcessDepth();
+ }
public IStructuredSelection getSelection() {
TableItem[] items = addRemoveTableComposite.getTableViewer().getTable().getItems();
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/HibernateJPAWizard.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/HibernateJPAWizard.java 2010-01-05 18:07:49 UTC (rev 19648)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/HibernateJPAWizard.java 2010-01-05 18:08:29 UTC (rev 19649)
@@ -120,8 +120,8 @@
EntitiesList entitiesList = (EntitiesList)targetPage;
final IStructuredSelection selection = entitiesSource.getSelection();
IHibernateJPAWizardData data =
- HibernateJPAWizardDataFactory.createHibernateJPAWizardData(selection,
- params);
+ HibernateJPAWizardDataFactory.createHibernateJPAWizardData(
+ selection, params, entitiesSource.getProcessDepth());
entitiesList.setData(data);
}
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/HibernateJPAWizardDataFactory.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/HibernateJPAWizardDataFactory.java 2010-01-05 18:07:49 UTC (rev 19648)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/process/wizard/HibernateJPAWizardDataFactory.java 2010-01-05 18:08:29 UTC (rev 19649)
@@ -51,7 +51,8 @@
@SuppressWarnings("unchecked")
static public IHibernateJPAWizardData createHibernateJPAWizardData(
- final IStructuredSelection selection2Update, IHibernateJPAWizardParams params) {
+ final IStructuredSelection selection2Update,
+ IHibernateJPAWizardParams params, int depth) {
CompilationUnitCollector compileUnitCollector = new CompilationUnitCollector();
Iterator itSelection2Update = selection2Update.iterator();
@@ -64,7 +65,7 @@
collector.initCollector();
while (it.hasNext()) {
ICompilationUnit cu = it.next();
- collector.collect(cu);
+ collector.collect(cu, depth);
}
collector.resolveRelations();
final Map<String, EntityInfo> entities = collector.getMapCUs_Info();
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/AddRemoveTableComposite.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/AddRemoveTableComposite.java 2010-01-05 18:07:49 UTC (rev 19648)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/AddRemoveTableComposite.java 2010-01-05 18:08:29 UTC (rev 19649)
@@ -27,6 +27,8 @@
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.viewers.ArrayContentProvider;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Table;
@@ -35,6 +37,7 @@
import org.eclipse.swt.widgets.Widget;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.dialogs.SelectionDialog;
+import org.hibernate.eclipse.console.HibernateConsoleMessages;
import org.hibernate.eclipse.console.wizards.UpDownListComposite;
import org.hibernate.eclipse.jdt.ui.internal.JdtUiMessages;
@@ -45,6 +48,8 @@
@SuppressWarnings("restriction")
public class AddRemoveTableComposite extends UpDownListComposite {
+ protected Button depthControl;
+
public AddRemoveTableComposite(Composite parent, int style) {
super(parent, style, "", //$NON-NLS-1$
false, new JavaElementLabelProvider(),
@@ -57,6 +62,22 @@
return new String[] { JdtUiMessages.AddRemoveTableComposite_add_class,
JdtUiMessages.AddRemoveTableComposite_add_package};
}
+
+ @Override
+ protected void createAdditionalOptions(Composite parent) {
+ GridData gridData = new org.eclipse.swt.layout.GridData();
+ gridData.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
+ gridData.grabExcessHorizontalSpace = false;
+ gridData.grabExcessVerticalSpace = false;
+ gridData.verticalAlignment = SWT.BOTTOM;
+ depthControl = new Button(parent, SWT.CHECK);
+ depthControl.setText(HibernateConsoleMessages.AddRemoveTableComposite_no_dependencies);
+ depthControl.setLayoutData(gridData);
+ }
+
+ public int getProcessDepth() {
+ return depthControl.getSelection() ? 0 : Integer.MAX_VALUE;
+ }
protected void createColumns(Table table) {
TableColumn column = new TableColumn(table, SWT.NULL);
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/ConfigurationActor.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/ConfigurationActor.java 2010-01-05 18:07:49 UTC (rev 19648)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/ConfigurationActor.java 2010-01-05 18:08:29 UTC (rev 19649)
@@ -87,7 +87,7 @@
*
* @return different configuration for different projects
*/
- public Map<IJavaProject, Configuration> createConfigurations(){
+ public Map<IJavaProject, Configuration> createConfigurations(int processDepth){
Map<IJavaProject, Configuration> configs = new HashMap<IJavaProject, Configuration>();
if (selectionCU.size() == 0) {
return configs;
@@ -118,7 +118,7 @@
collector.initCollector();
while (setIt.hasNext()) {
ICompilationUnit icu = setIt.next();
- collector.collect(icu);
+ collector.collect(icu, processDepth);
}
collector.resolveRelations();
//I don't check here if any non abstract class selected
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/NewHibernateMappingElementsSelectionPage2.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/NewHibernateMappingElementsSelectionPage2.java 2010-01-05 18:07:49 UTC (rev 19648)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/NewHibernateMappingElementsSelectionPage2.java 2010-01-05 18:08:29 UTC (rev 19649)
@@ -55,6 +55,10 @@
return new StructuredSelection(data);
}
+ public int getProcessDepth() {
+ return addRemoveTableComposite.getProcessDepth();
+ }
+
protected void itemsChanged(){
getContainer().updateButtons();
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/NewHibernateMappingFileWizard.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/NewHibernateMappingFileWizard.java 2010-01-05 18:07:49 UTC (rev 19648)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/wizards/NewHibernateMappingFileWizard.java 2010-01-05 18:08:29 UTC (rev 19649)
@@ -87,6 +87,8 @@
private Map<IJavaProject, Collection<EntityInfo>> project_infos = new HashMap<IJavaProject, Collection<EntityInfo>>();
private IStructuredSelection selection;
+ // process depth of current selection
+ private int processDepth = Integer.MIN_VALUE;
private NewHibernateMappingElementsSelectionPage2 page0 = null;
@@ -360,7 +362,7 @@
collector.initCollector();
while (setIt.hasNext()) {
ICompilationUnit icu = setIt.next();
- collector.collect(icu);
+ collector.collect(icu, processDepth);
}
collector.resolveRelations();
Collection<EntityInfo> c = new ArrayList<EntityInfo>();
@@ -373,16 +375,19 @@
}
}
- protected void processJavaElements(Object obj) {
+ protected void processJavaElements(Object obj, int depth) {
+ if (depth < 0) {
+ return;
+ }
try {
if (obj instanceof ICompilationUnit) {
ICompilationUnit cu = (ICompilationUnit) obj;
selectionCU.add(cu);
- } else if (obj instanceof JavaProject) {
+ } else if (obj instanceof JavaProject && depth > 0) {
JavaProject javaProject = (JavaProject) obj;
IPackageFragmentRoot[] pfr = javaProject.getAllPackageFragmentRoots();
for (IPackageFragmentRoot element : pfr) {
- processJavaElements(element);
+ processJavaElements(element, depth - 1);
}
} else if (obj instanceof PackageFragment) {
PackageFragment packageFragment = (PackageFragment) obj;
@@ -390,12 +395,12 @@
for (ICompilationUnit cu : cus) {
selectionCU.add(cu);
}
- } else if (obj instanceof PackageFragmentRoot) {
+ } else if (obj instanceof PackageFragmentRoot && depth > 0) {
JavaElement javaElement = (JavaElement) obj;
JavaElementInfo javaElementInfo = (JavaElementInfo) javaElement.getElementInfo();
IJavaElement[] je = javaElementInfo.getChildren();
for (IJavaElement element : je) {
- processJavaElements(element);
+ processJavaElements(element, depth - 1);
}
} else if (obj instanceof JavaElement) {
JavaElement javaElement = (JavaElement) obj;
@@ -411,16 +416,18 @@
protected Map<IJavaProject, Configuration> createConfigurations() {
ConfigurationActor actor = new ConfigurationActor(selectionCU);
- Map<IJavaProject, Configuration> configs = actor.createConfigurations();
+ Map<IJavaProject, Configuration> configs = actor.createConfigurations(processDepth);
return configs;
}
protected void updateCompilationUnits(){
Assert.isNotNull(page0.getSelection(), JdtUiMessages.NewHibernateMappingFileWizard_selection_cant_be_empty);
- if ((selectionCU == null) || !page0.getSelection().equals(selection)) {
+ if ((selectionCU == null) || !page0.getSelection().equals(selection) ||
+ processDepth != page0.getProcessDepth()) {
selectionCU = new HashSet<ICompilationUnit>();
project_infos.clear();
selection = page0.getSelection();
+ processDepth = page0.getProcessDepth();
try {
getContainer().run(false, false, new IRunnableWithProgress() {
@@ -432,7 +439,7 @@
int done = 1;
while (it.hasNext()) {
Object obj = it.next();
- processJavaElements(obj);
+ processJavaElements(obj, processDepth);
monitor.worked(done++);
}
initEntitiesInfo();
14 years, 11 months
JBoss Tools SVN: r19648 - in trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console: wizards and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2010-01-05 13:07:49 -0500 (Tue, 05 Jan 2010)
New Revision: 19648
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/UpDownListComposite.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5159 - first step implementation
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java 2010-01-05 17:40:38 UTC (rev 19647)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.java 2010-01-05 18:07:49 UTC (rev 19648)
@@ -502,6 +502,8 @@
public static String DeleteProjectParticipant_console_configurations_updates;
public static String DeleteProjectParticipant_delete_console_configuration;
+
+ public static String AddRemoveTableComposite_no_dependencies;
//
static {
// initialize resource bundle
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties 2010-01-05 17:40:38 UTC (rev 19647)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsoleMessages.properties 2010-01-05 18:07:49 UTC (rev 19648)
@@ -503,4 +503,6 @@
ConnectionProfileCtrl_JPAConfiguredConnection=[JPA Project Configured Connection]
ConnectionProfileCtrl_New=New...
ConnectionProfileRenameChange_update_connection_profile_name=Update connection profile name in launch configuration
-ConnectionProfileRenameParticipant_launch_configurations_updates=Launch Configurations updates
\ No newline at end of file
+ConnectionProfileRenameParticipant_launch_configurations_updates=Launch Configurations updates
+
+AddRemoveTableComposite_no_dependencies=no dependencies
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/UpDownListComposite.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/UpDownListComposite.java 2010-01-05 17:40:38 UTC (rev 19647)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/UpDownListComposite.java 2010-01-05 18:07:49 UTC (rev 19648)
@@ -174,7 +174,7 @@
GridData gridData2 = new org.eclipse.swt.layout.GridData();
gridData2.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
gridData2.grabExcessHorizontalSpace = false;
- gridData2.grabExcessVerticalSpace = false;
+ gridData2.grabExcessVerticalSpace = true;
gridData2.verticalAlignment = org.eclipse.swt.layout.GridData.FILL;
buttons = new Composite( group, SWT.NONE );
buttons.setLayout(new GridLayout());
@@ -202,8 +202,13 @@
downButton.setText(HibernateConsoleMessages.UpDownListComposite_down);
downButton.setLayoutData(gridData5);
downButton.addSelectionListener(buttonListener);
+
+ createAdditionalOptions(buttons);
}
+ protected void createAdditionalOptions(Composite parent) {
+ }
+
protected String[] getAddButtonLabels() {
return new String[] { HibernateConsoleMessages.UpDownListComposite_add };
}
14 years, 11 months