[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [Subclipse-dev] open resource from change path list

From: Eugene Kuleshov <eu_at_javatx.com>
Date: 2005-06-21 03:43:13 CEST

Mark Phippard wrote:

> > By the way, current repository properies dialod doesn't allow to
> > see URL if label had been changes. I add some static non editable label
> > that will show this URL to this dialog. What do you think?
>
> I think that is a good idea. Please send a patch.

  Here it is.
  I also fixed with of the custom label text entry field. Hope that you
don't mind.

  regards,
  Eugene

Index: C:/dev/eclipse/org.tigris.subversion.subclipse.ui/src/org/tigris/subversion/subclipse/ui/properties/SVNRepositoryPropertiesPage.java
===================================================================
--- C:/dev/eclipse/org.tigris.subversion.subclipse.ui/src/org/tigris/subversion/subclipse/ui/properties/SVNRepositoryPropertiesPage.java (revision 1393)
+++ C:/dev/eclipse/org.tigris.subversion.subclipse.ui/src/org/tigris/subversion/subclipse/ui/properties/SVNRepositoryPropertiesPage.java (working copy)
@@ -48,6 +48,7 @@
     private Button useCustomLabelButton;
     private boolean passwordChanged;
     private Text repositoryRootText;
+ private Text repositoryUrlText;
     
         /* (non-Javadoc)
          * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
@@ -74,6 +75,7 @@
         
         // group for label
                 Composite labelGroup = new Composite(composite, SWT.NONE);
+ labelGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
                 layout = new GridLayout();
                 layout.numColumns = 2;
                 labelGroup.setLayout(layout);
@@ -94,8 +96,8 @@
                 useCustomLabelButton.setLayoutData(data);
                 customLabelText = new Text(labelGroup, SWT.SINGLE | SWT.BORDER);
         customLabelText.addListener(SWT.Modify, labelListener);
- data = new GridData();
- data.widthHint = 200;
+ data = new GridData(GridData.FILL_HORIZONTAL);
+ // data.widthHint = 200;
         customLabelText.setLayoutData(data);
         
         // empty label to separate
@@ -139,6 +141,17 @@
         layout.numColumns = 3;
         repositoryRootGroup.setLayout(layout);
         
+ // url of the repository
+ label = new Label(repositoryRootGroup, SWT.NONE);
+ label.setText(Policy.bind("SVNRepositoryPropertiesPage.repositoryUrl")); //$NON-NLS-1$
+ repositoryUrlText = new Text(repositoryRootGroup, SWT.SINGLE);
+ repositoryUrlText.setText( "");
+ repositoryUrlText.setEditable(false);
+ data = new GridData(GridData.FILL_HORIZONTAL);
+ data.grabExcessHorizontalSpace = true;
+ data.horizontalSpan = 2;
+ repositoryUrlText.setLayoutData(data);
+
         // url of the repository root
         label = new Label(repositoryRootGroup, SWT.NONE);
         label.setText(Policy.bind("SVNRepositoryPropertiesPage.repositoryRootUrl")); //$NON-NLS-1$
@@ -233,6 +246,13 @@
         }
         customLabelText.setText(label);
         
+ SVNUrl url = location.getUrl();
+ if (url != null) {
+ repositoryUrlText.setText(url.get());
+ } else {
+ repositoryUrlText.setText(""); //$NON-NLS-1$
+ }
+
         SVNUrl repositoryRoot = location.getRepositoryRoot();
         if (repositoryRoot != null) {
             repositoryRootText.setText(repositoryRoot.get());
Index: C:/dev/eclipse/org.tigris.subversion.subclipse.ui/src/org/tigris/subversion/subclipse/ui/messages.properties
===================================================================
--- C:/dev/eclipse/org.tigris.subversion.subclipse.ui/src/org/tigris/subversion/subclipse/ui/messages.properties (revision 1393)
+++ C:/dev/eclipse/org.tigris.subversion.subclipse.ui/src/org/tigris/subversion/subclipse/ui/messages.properties (working copy)
@@ -784,6 +784,7 @@
 SVNRepositoryPropertiesPage.useCustomLabel=Use a custom label :
 SVNRepositoryPropertiesPage.login=Login :
 SVNRepositoryPropertiesPage.password=Password :
+SVNRepositoryPropertiesPage.repositoryUrl=Repository url :
 SVNRepositoryPropertiesPage.repositoryRootUrl=Repository root url :
 SVNRepositoryPropertiesPage.browseRootUrl=Browse ...
 SVNRepositoryPropertiesPage.rootUrlWarning=If your repository url is http://mycompany.com/repository/trunk/project, \nyour root repository url is probably http://mycompany.com/repository
Received on Tue Jun 21 11:43:13 2005

This is an archived mail posted to the Subclipse Dev mailing list.