All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [eclipse-poky-windows][branch:windows-build]Remove validate existing repository radio button
@ 2012-12-11 11:03 Ioana Grigoropol
  2012-12-11 13:27 ` Laurentiu Palcu
  0 siblings, 1 reply; 3+ messages in thread
From: Ioana Grigoropol @ 2012-12-11 11:03 UTC (permalink / raw)
  To: yocto

- remove radio button for validating existing repository but keep performing the validation in the back
- make 'clone' button a check button

Signed-off-by: Ioana Grigoropol <ioanax.grigoropol@intel.com>
---
 .../yocto/bc/ui/wizards/install/OptionsPage.java   |   40 +++++++++-----------
 1 file changed, 18 insertions(+), 22 deletions(-)

diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/install/OptionsPage.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/install/OptionsPage.java
index 9e94aea..9c01e4e 100644
--- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/install/OptionsPage.java
+++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/install/OptionsPage.java
@@ -54,7 +54,7 @@ public class OptionsPage extends FiniteStateWizardPage {
 	private ValidationListener validationListener;
 	private Text txtProjectName;
 	private Button btnGit;
-	private Button btnValidate;
+//	private Button btnValidate;
 
 	private RemoteProjectContentsLocationArea locationArea;
 
@@ -67,7 +67,7 @@ public class OptionsPage extends FiniteStateWizardPage {
 	public void createControl(Composite parent) {
 		top = new Composite(parent, SWT.None);
 		top.setLayout(new GridLayout());
-		top.setLayoutData(new GridData(GridData.FILL_BOTH));
+		top.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
 
 		GridData gdFillH = new GridData(GridData.FILL_HORIZONTAL);
 
@@ -97,25 +97,26 @@ public class OptionsPage extends FiniteStateWizardPage {
 
 		locationArea = new RemoteProjectContentsLocationArea(errorReporter, top, null);
 
-		Group locationValidationGroup = new Group(top, SWT.NONE);
-		locationValidationGroup.setText("Git repository");
-		GridData gd = new GridData(GridData.VERTICAL_ALIGN_END | GridData.FILL_HORIZONTAL);
-		locationValidationGroup.setLayoutData(gd);
-		GridLayout gl = new GridLayout(1, false);
-		locationValidationGroup.setLayout(gl);
+//		Group locationValidationGroup = new Group(top, SWT.NONE);
+//		locationValidationGroup.setText("Git repository");
+//		GridData gd = new GridData(GridData.VERTICAL_ALIGN_END | GridData.FILL_HORIZONTAL);
+//		locationValidationGroup.setLayoutData(gd);
+//		GridLayout gl = new GridLayout(1, false);
+//		locationValidationGroup.setLayout(gl);
 
-		btnGit = new Button(locationValidationGroup, SWT.RADIO);
+		btnGit = new Button(top, SWT.CHECK);
 		btnGit.setText("Clone from Yocto Project &Git Repository into new location");
 		btnGit.setEnabled(true);
 		btnGit.setSelection(true);
 		btnGit.addSelectionListener(validationListener);
+		GridData gd = new GridData(GridData.VERTICAL_ALIGN_END | GridData.FILL_HORIZONTAL);
+		btnGit.setLayoutData(gd);
 
-
-		btnValidate = new Button(locationValidationGroup, SWT.RADIO);
-		btnValidate.setText("&Validate existing Git project location");
-		btnValidate.setEnabled(true);
-		btnValidate.setSelection(false);
-		btnValidate.addSelectionListener(validationListener);
+//		btnValidate = new Button(locationValidationGroup, SWT.RADIO);
+//		btnValidate.setText("&Validate existing Git project location");
+//		btnValidate.setEnabled(true);
+//		btnValidate.setSelection(false);
+//		btnValidate.addSelectionListener(validationListener);
 
 		setControl(top);
 	}
@@ -165,16 +166,11 @@ public class OptionsPage extends FiniteStateWizardPage {
 		String projectPath = projectLoc + separator + getProjectName();
 		IHostFile repoDest = RemoteHelper.getRemoteHostFile(connection, projectPath, new NullProgressMonitor());
 
-		if(btnValidate.getSelection()) {
+		if(!btnGit.getSelection()) {
 			if (repoDest == null || !repoDest.exists()) {
 				setErrorMessage("Directory " + projectPath + " does not exist, please select git clone.");
 				return false;
 			}
-//			IHostFile gitDescr = RemoteHelper.getRemoteHostFile(connection, projectPath + "/.git", new NullProgressMonitor());
-//			if (gitDescr == null || !gitDescr.exists()) {
-//				setErrorMessage("Directory " + projectPath + " does not contain a git repository, please select git clone.");
-//				return false;
-//			}
 
 			IHostFile validationFile = RemoteHelper.getRemoteHostFile(connection, projectPath + URI_SEPARATOR + InstallWizard.VALIDATION_FILE, new NullProgressMonitor());
 			if (validationFile == null || !validationFile.exists()) {
@@ -185,7 +181,7 @@ public class OptionsPage extends FiniteStateWizardPage {
 			if (repoDest.exists() && repoDest.isDirectory()) {
 				IHostFile gitDescr = RemoteHelper.getRemoteHostFile(connection, projectPath + "/.git", new NullProgressMonitor());
 				if (gitDescr != null && gitDescr.exists()) {
-					setErrorMessage("Directory " + projectPath + " contains a repository, please select validate repository.");
+					setErrorMessage("Directory " + projectPath + " contains a repository, please choose another location or skip cloning the repository.");
 					return false;
 				}
 			}
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] [eclipse-poky-windows][branch:windows-build]Remove validate existing repository radio button
  2012-12-11 11:03 [PATCH] [eclipse-poky-windows][branch:windows-build]Remove validate existing repository radio button Ioana Grigoropol
@ 2012-12-11 13:27 ` Laurentiu Palcu
  2012-12-11 13:47   ` Grigoropol, IoanaX
  0 siblings, 1 reply; 3+ messages in thread
From: Laurentiu Palcu @ 2012-12-11 13:27 UTC (permalink / raw)
  To: Ioana Grigoropol; +Cc: yocto

Why don't you remove the commented code completely? You can always look
into file's git history if you need to.

Thanks,
Laurentiu

On 12/11/2012 01:03 PM, Ioana Grigoropol wrote:
> - remove radio button for validating existing repository but keep performing the validation in the back
> - make 'clone' button a check button
> 
> Signed-off-by: Ioana Grigoropol <ioanax.grigoropol@intel.com>
> ---
>  .../yocto/bc/ui/wizards/install/OptionsPage.java   |   40 +++++++++-----------
>  1 file changed, 18 insertions(+), 22 deletions(-)
> 
> diff --git a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/install/OptionsPage.java b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/install/OptionsPage.java
> index 9e94aea..9c01e4e 100644
> --- a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/install/OptionsPage.java
> +++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/install/OptionsPage.java
> @@ -54,7 +54,7 @@ public class OptionsPage extends FiniteStateWizardPage {
>  	private ValidationListener validationListener;
>  	private Text txtProjectName;
>  	private Button btnGit;
> -	private Button btnValidate;
> +//	private Button btnValidate;
>  
>  	private RemoteProjectContentsLocationArea locationArea;
>  
> @@ -67,7 +67,7 @@ public class OptionsPage extends FiniteStateWizardPage {
>  	public void createControl(Composite parent) {
>  		top = new Composite(parent, SWT.None);
>  		top.setLayout(new GridLayout());
> -		top.setLayoutData(new GridData(GridData.FILL_BOTH));
> +		top.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
>  
>  		GridData gdFillH = new GridData(GridData.FILL_HORIZONTAL);
>  
> @@ -97,25 +97,26 @@ public class OptionsPage extends FiniteStateWizardPage {
>  
>  		locationArea = new RemoteProjectContentsLocationArea(errorReporter, top, null);
>  
> -		Group locationValidationGroup = new Group(top, SWT.NONE);
> -		locationValidationGroup.setText("Git repository");
> -		GridData gd = new GridData(GridData.VERTICAL_ALIGN_END | GridData.FILL_HORIZONTAL);
> -		locationValidationGroup.setLayoutData(gd);
> -		GridLayout gl = new GridLayout(1, false);
> -		locationValidationGroup.setLayout(gl);
> +//		Group locationValidationGroup = new Group(top, SWT.NONE);
> +//		locationValidationGroup.setText("Git repository");
> +//		GridData gd = new GridData(GridData.VERTICAL_ALIGN_END | GridData.FILL_HORIZONTAL);
> +//		locationValidationGroup.setLayoutData(gd);
> +//		GridLayout gl = new GridLayout(1, false);
> +//		locationValidationGroup.setLayout(gl);
>  
> -		btnGit = new Button(locationValidationGroup, SWT.RADIO);
> +		btnGit = new Button(top, SWT.CHECK);
>  		btnGit.setText("Clone from Yocto Project &Git Repository into new location");
>  		btnGit.setEnabled(true);
>  		btnGit.setSelection(true);
>  		btnGit.addSelectionListener(validationListener);
> +		GridData gd = new GridData(GridData.VERTICAL_ALIGN_END | GridData.FILL_HORIZONTAL);
> +		btnGit.setLayoutData(gd);
>  
> -
> -		btnValidate = new Button(locationValidationGroup, SWT.RADIO);
> -		btnValidate.setText("&Validate existing Git project location");
> -		btnValidate.setEnabled(true);
> -		btnValidate.setSelection(false);
> -		btnValidate.addSelectionListener(validationListener);
> +//		btnValidate = new Button(locationValidationGroup, SWT.RADIO);
> +//		btnValidate.setText("&Validate existing Git project location");
> +//		btnValidate.setEnabled(true);
> +//		btnValidate.setSelection(false);
> +//		btnValidate.addSelectionListener(validationListener);
>  
>  		setControl(top);
>  	}
> @@ -165,16 +166,11 @@ public class OptionsPage extends FiniteStateWizardPage {
>  		String projectPath = projectLoc + separator + getProjectName();
>  		IHostFile repoDest = RemoteHelper.getRemoteHostFile(connection, projectPath, new NullProgressMonitor());
>  
> -		if(btnValidate.getSelection()) {
> +		if(!btnGit.getSelection()) {
>  			if (repoDest == null || !repoDest.exists()) {
>  				setErrorMessage("Directory " + projectPath + " does not exist, please select git clone.");
>  				return false;
>  			}
> -//			IHostFile gitDescr = RemoteHelper.getRemoteHostFile(connection, projectPath + "/.git", new NullProgressMonitor());
> -//			if (gitDescr == null || !gitDescr.exists()) {
> -//				setErrorMessage("Directory " + projectPath + " does not contain a git repository, please select git clone.");
> -//				return false;
> -//			}
>  
>  			IHostFile validationFile = RemoteHelper.getRemoteHostFile(connection, projectPath + URI_SEPARATOR + InstallWizard.VALIDATION_FILE, new NullProgressMonitor());
>  			if (validationFile == null || !validationFile.exists()) {
> @@ -185,7 +181,7 @@ public class OptionsPage extends FiniteStateWizardPage {
>  			if (repoDest.exists() && repoDest.isDirectory()) {
>  				IHostFile gitDescr = RemoteHelper.getRemoteHostFile(connection, projectPath + "/.git", new NullProgressMonitor());
>  				if (gitDescr != null && gitDescr.exists()) {
> -					setErrorMessage("Directory " + projectPath + " contains a repository, please select validate repository.");
> +					setErrorMessage("Directory " + projectPath + " contains a repository, please choose another location or skip cloning the repository.");
>  					return false;
>  				}
>  			}
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] [eclipse-poky-windows][branch:windows-build]Remove validate existing repository radio button
  2012-12-11 13:27 ` Laurentiu Palcu
@ 2012-12-11 13:47   ` Grigoropol, IoanaX
  0 siblings, 0 replies; 3+ messages in thread
From: Grigoropol, IoanaX @ 2012-12-11 13:47 UTC (permalink / raw)
  To: Palcu, Laurentiu; +Cc: yocto@yoctoproject.org

Sure. Patch resent to list.

Thanks,
Ioana

-----Original Message-----
From: Palcu, Laurentiu 
Sent: Tuesday, December 11, 2012 3:28 PM
To: Grigoropol, IoanaX
Cc: yocto@yoctoproject.org
Subject: Re: [yocto] [PATCH] [eclipse-poky-windows][branch:windows-build]Remove validate existing repository radio button

Why don't you remove the commented code completely? You can always look into file's git history if you need to.

Thanks,
Laurentiu

On 12/11/2012 01:03 PM, Ioana Grigoropol wrote:
> - remove radio button for validating existing repository but keep 
> performing the validation in the back
> - make 'clone' button a check button
> 
> Signed-off-by: Ioana Grigoropol <ioanax.grigoropol@intel.com>
> ---
>  .../yocto/bc/ui/wizards/install/OptionsPage.java   |   40 +++++++++-----------
>  1 file changed, 18 insertions(+), 22 deletions(-)
> 
> diff --git 
> a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/install/OptionsP
> age.java 
> b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/install/OptionsP
> age.java
> index 9e94aea..9c01e4e 100644
> --- 
> a/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/install/OptionsP
> age.java
> +++ b/plugins/org.yocto.bc.ui/src/org/yocto/bc/ui/wizards/install/Opti
> +++ onsPage.java
> @@ -54,7 +54,7 @@ public class OptionsPage extends FiniteStateWizardPage {
>  	private ValidationListener validationListener;
>  	private Text txtProjectName;
>  	private Button btnGit;
> -	private Button btnValidate;
> +//	private Button btnValidate;
>  
>  	private RemoteProjectContentsLocationArea locationArea;
>  
> @@ -67,7 +67,7 @@ public class OptionsPage extends FiniteStateWizardPage {
>  	public void createControl(Composite parent) {
>  		top = new Composite(parent, SWT.None);
>  		top.setLayout(new GridLayout());
> -		top.setLayoutData(new GridData(GridData.FILL_BOTH));
> +		top.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
>  
>  		GridData gdFillH = new GridData(GridData.FILL_HORIZONTAL);
>  
> @@ -97,25 +97,26 @@ public class OptionsPage extends 
> FiniteStateWizardPage {
>  
>  		locationArea = new RemoteProjectContentsLocationArea(errorReporter, 
> top, null);
>  
> -		Group locationValidationGroup = new Group(top, SWT.NONE);
> -		locationValidationGroup.setText("Git repository");
> -		GridData gd = new GridData(GridData.VERTICAL_ALIGN_END | GridData.FILL_HORIZONTAL);
> -		locationValidationGroup.setLayoutData(gd);
> -		GridLayout gl = new GridLayout(1, false);
> -		locationValidationGroup.setLayout(gl);
> +//		Group locationValidationGroup = new Group(top, SWT.NONE);
> +//		locationValidationGroup.setText("Git repository");
> +//		GridData gd = new GridData(GridData.VERTICAL_ALIGN_END | GridData.FILL_HORIZONTAL);
> +//		locationValidationGroup.setLayoutData(gd);
> +//		GridLayout gl = new GridLayout(1, false);
> +//		locationValidationGroup.setLayout(gl);
>  
> -		btnGit = new Button(locationValidationGroup, SWT.RADIO);
> +		btnGit = new Button(top, SWT.CHECK);
>  		btnGit.setText("Clone from Yocto Project &Git Repository into new location");
>  		btnGit.setEnabled(true);
>  		btnGit.setSelection(true);
>  		btnGit.addSelectionListener(validationListener);
> +		GridData gd = new GridData(GridData.VERTICAL_ALIGN_END | GridData.FILL_HORIZONTAL);
> +		btnGit.setLayoutData(gd);
>  
> -
> -		btnValidate = new Button(locationValidationGroup, SWT.RADIO);
> -		btnValidate.setText("&Validate existing Git project location");
> -		btnValidate.setEnabled(true);
> -		btnValidate.setSelection(false);
> -		btnValidate.addSelectionListener(validationListener);
> +//		btnValidate = new Button(locationValidationGroup, SWT.RADIO);
> +//		btnValidate.setText("&Validate existing Git project location");
> +//		btnValidate.setEnabled(true);
> +//		btnValidate.setSelection(false);
> +//		btnValidate.addSelectionListener(validationListener);
>  
>  		setControl(top);
>  	}
> @@ -165,16 +166,11 @@ public class OptionsPage extends FiniteStateWizardPage {
>  		String projectPath = projectLoc + separator + getProjectName();
>  		IHostFile repoDest = RemoteHelper.getRemoteHostFile(connection, 
> projectPath, new NullProgressMonitor());
>  
> -		if(btnValidate.getSelection()) {
> +		if(!btnGit.getSelection()) {
>  			if (repoDest == null || !repoDest.exists()) {
>  				setErrorMessage("Directory " + projectPath + " does not exist, please select git clone.");
>  				return false;
>  			}
> -//			IHostFile gitDescr = RemoteHelper.getRemoteHostFile(connection, projectPath + "/.git", new NullProgressMonitor());
> -//			if (gitDescr == null || !gitDescr.exists()) {
> -//				setErrorMessage("Directory " + projectPath + " does not contain a git repository, please select git clone.");
> -//				return false;
> -//			}
>  
>  			IHostFile validationFile = RemoteHelper.getRemoteHostFile(connection, projectPath + URI_SEPARATOR + InstallWizard.VALIDATION_FILE, new NullProgressMonitor());
>  			if (validationFile == null || !validationFile.exists()) { @@ 
> -185,7 +181,7 @@ public class OptionsPage extends FiniteStateWizardPage {
>  			if (repoDest.exists() && repoDest.isDirectory()) {
>  				IHostFile gitDescr = RemoteHelper.getRemoteHostFile(connection, projectPath + "/.git", new NullProgressMonitor());
>  				if (gitDescr != null && gitDescr.exists()) {
> -					setErrorMessage("Directory " + projectPath + " contains a repository, please select validate repository.");
> +					setErrorMessage("Directory " + projectPath + " contains a 
> +repository, please choose another location or skip cloning the 
> +repository.");
>  					return false;
>  				}
>  			}
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-12-11 13:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-11 11:03 [PATCH] [eclipse-poky-windows][branch:windows-build]Remove validate existing repository radio button Ioana Grigoropol
2012-12-11 13:27 ` Laurentiu Palcu
2012-12-11 13:47   ` Grigoropol, IoanaX

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.