Login | Register
My pages Projects Community openCollabNet

Discussions > cvs > subclipse commit: rev 19 - in trunk/subclipse/core/src/org/tigris/subversion/subclipse/core: . repo resources

subclipse
Discussion topic

Back to topic list

subclipse commit: rev 19 - in trunk/subclipse/core/src/org/tigris/subversion/subclipse/core: . repo resources

Author cchab
Full name chabanois cédric
Date 2003-06-30 12:14:33 PDT
Message Author: cchab
Date: Mon Jun 30 14:14:27 2003
New Revision: 19

Modified:
   trunk/subclipse/core​/src/org/tigris/subv​ersion/subclipse/cor​e/ISVNLocalResource.​java
   trunk/subclipse/core​/src/org/tigris/subv​ersion/subclipse/cor​e/ISVNRemoteFolder.j​ava
   trunk/subclipse/core​/src/org/tigris/subv​ersion/subclipse/cor​e/ISVNRemoteResource​.java
   trunk/subclipse/core​/src/org/tigris/subv​ersion/subclipse/cor​e/ISVNRepositoryLoca​tion.java
   trunk/subclipse/core​/src/org/tigris/subv​ersion/subclipse/cor​e/ISVNResource.java
   trunk/subclipse/core​/src/org/tigris/subv​ersion/subclipse/cor​e/repo/SVNRepositori​es.java
   trunk/subclipse/core​/src/org/tigris/subv​ersion/subclipse/cor​e/repo/SVNRepository​Location.java
   trunk/subclipse/core​/src/org/tigris/subv​ersion/subclipse/cor​e/resources/RemoteFo​lder.java
   trunk/subclipse/core​/src/org/tigris/subv​ersion/subclipse/cor​e/resources/RemoteRe​source.java
Log:
added a wizard to create a new remote folder on repository

Modified: trunk/subclipse/core​/src/org/tigris/subv​ersion/subclipse/cor​e/ISVNLocalResource.​java
====================​====================​====================​==================
--- trunk/subclipse/core​/src/org/tigris/subv​ersion/subclipse/cor​e/ISVNLocalResource.​java (original)
+++ trunk/subclipse/core​/src/org/tigris/subv​ersion/subclipse/cor​e/ISVNLocalResource.​java Mon Jun 30 14:14:27 2003
@@ -105,4 +105,13 @@
    */
   public void setIgnored() throws SVNException;
 
+ /**
+ * Answer whether the resource could be ignored.
+ * Even if a resource is ignored, it can still be added to a repository, at which
+ * time it should never be ignored by the SVN client.
+ *
+ */
+ public boolean isIgnored() throws SVNException;
+
+
 }

Modified: trunk/subclipse/core​/src/org/tigris/subv​ersion/subclipse/cor​e/ISVNRemoteFolder.j​ava
====================​====================​====================​==================
--- trunk/subclipse/core​/src/org/tigris/subv​ersion/subclipse/cor​e/ISVNRemoteFolder.j​ava (original)
+++ trunk/subclipse/core​/src/org/tigris/subv​ersion/subclipse/cor​e/ISVNRemoteFolder.j​ava Mon Jun 30 14:14:27 2003
@@ -11,6 +11,8 @@
  ********************​********************​********************​*******************/​
 package org.tigris.subversio​n.subclipse.core;
 
+import org.eclipse.core.run​time.IProgressMonito​r;
+
  
 
  /**
@@ -20,6 +22,7 @@
   * Clients are not expected to implement this interface.
   */
 public interface ISVNRemoteFolder extends ISVNRemoteResource, ISVNFolder {
-
+
+ public void createRemoteFolder(String folderName, String message,IProgressMonitor monitor) throws SVNException;
     
 }

Modified: trunk/subclipse/core​/src/org/tigris/subv​ersion/subclipse/cor​e/ISVNRemoteResource​.java
====================​====================​====================​==================
--- trunk/subclipse/core​/src/org/tigris/subv​ersion/subclipse/cor​e/ISVNRemoteResource​.java (original)
+++ trunk/subclipse/core​/src/org/tigris/subv​ersion/subclipse/cor​e/ISVNRemoteResource​.java Mon Jun 30 14:14:27 2003
@@ -83,5 +83,8 @@
      */
     public LogEntry[] getLogEntries(IProgressMonitor monitor) throws TeamException;
 
+ public ISVNRemoteFolder getParent();
+
+ public ISVNRepositoryLocation getRepository();
 
 }

Modified: trunk/subclipse/core​/src/org/tigris/subv​ersion/subclipse/cor​e/ISVNRepositoryLoca​tion.java
====================​====================​====================​==================
--- trunk/subclipse/core​/src/org/tigris/subv​ersion/subclipse/cor​e/ISVNRepositoryLoca​tion.java (original)
+++ trunk/subclipse/core​/src/org/tigris/subv​ersion/subclipse/cor​e/ISVNRepositoryLoca​tion.java Mon Jun 30 14:14:27 2003
@@ -87,7 +87,10 @@
     
     public SVNClientAdapter getSVNClient();
     
-
+ public ISVNRemoteFolder getRootFolder();
+
+ public void refreshRootFolder();
+
     /**
      * Returns the user information for the location.
      */

Modified: trunk/subclipse/core​/src/org/tigris/subv​ersion/subclipse/cor​e/ISVNResource.java
====================​====================​====================​==================
--- trunk/subclipse/core​/src/org/tigris/subv​ersion/subclipse/cor​e/ISVNResource.java (original)
+++ trunk/subclipse/core​/src/org/tigris/subv​ersion/subclipse/cor​e/ISVNResource.java Mon Jun 30 14:14:27 2003
@@ -39,14 +39,6 @@
     public String getName();
     
     /**
- * Answer whether the resource could be ignored.
- * Even if a resource is ignored, it can still be added to a repository, at which
- * time it should never be ignored by the SVN client.
- *
- */
- public boolean isIgnored() throws SVNException;
-
- /**
      * Answers if the handle is a file or a folder handle.
      *
      * @return <code>true</code> if this is a folder handle and <code>false</code> if

Modified: trunk/subclipse/core​/src/org/tigris/subv​ersion/subclipse/cor​e/repo/SVNRepositori​es.java
====================​====================​====================​==================
--- trunk/subclipse/core​/src/org/tigris/subv​ersion/subclipse/cor​e/repo/SVNRepositori​es.java (original)
+++ trunk/subclipse/core​/src/org/tigris/subv​ersion/subclipse/cor​e/repo/SVNRepositori​es.java Mon Jun 30 14:14:27 2003
@@ -17,6 +17,7 @@
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.io.IOException;
+import java.net.URL;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
@@ -28,6 +29,7 @@
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.run​time.Status;
 import org.eclipse.team.cor​e.TeamException;
+import org.tigris.subversio​n.subclipse.core.ISV​NRemoteFolder;
 import org.tigris.subversio​n.subclipse.core.ISV​NRepositoryLocation;​
 import org.tigris.subversio​n.subclipse.core.Pol​icy;
 import org.tigris.subversio​n.subclipse.core.SVN​Exception;
@@ -123,6 +125,13 @@
         return (ISVNRepositoryLocat​ion[])repositories.v​alues().toArray(new ISVNRepositoryLocati​on[repositories.size​()]);
     }
 
+ public void refreshRepositoriesFolders() {
+ ISVNRepositoryLocation[] repositories = getKnownRepositories();
+ for (int i = 0; i < repositories.length;i++) {
+ repositories[i].refr​eshRootFolder();
+ }
+ }
+
     /**
      * Create a repository instance from the given properties.
      * The supported properties are:
@@ -152,27 +161,8 @@
     }
 
     /**
- * Get the repository instance which matches the given String. The format of the String is
- * the same as that returned by ICVSRepositoryLocati​on#getLocation().
- * The format is:
- *
- * connection:user[:pas​sword]@host[#port]:r​oot
- *
- * where [] indicates optional and the identier meanings are:
- *
- * connection The connection method to be used
- * user The username for the connection
- * password The password used for the connection (optional)
- * host The host where the repository resides
- * port The port to connect to (optional)
- * root The server directory where the repository is located
- *
- * It is expected that the instance requested by using this method exists.
- * If the repository location does not exist, it will be automatically created
- * and cached with the provider.
- *
- * WARNING: Providing the password as part of the String will result in the password being part
- * of the location permanently. This means that it cannot be modified by the authenticator.
+ * Get the repository instance which matches the given String.
+ * The format of the String is an url
      */
     public ISVNRepositoryLocation getRepository(String location) throws SVNException {
         ISVNRepositoryLocation repository = (ISVNRepositoryLocat​ion)repositories.get​(location);
@@ -299,6 +289,5 @@
     public boolean isKnownRepository(String location) {
         return repositories.get(location) != null;
     }
-
 
 }

Modified: trunk/subclipse/core​/src/org/tigris/subv​ersion/subclipse/cor​e/repo/SVNRepository​Location.java
====================​====================​====================​==================
--- trunk/subclipse/core​/src/org/tigris/subv​ersion/subclipse/cor​e/repo/SVNRepository​Location.java (original)
+++ trunk/subclipse/core​/src/org/tigris/subv​ersion/subclipse/cor​e/repo/SVNRepository​Location.java Mon Jun 30 14:14:27 2003
@@ -18,6 +18,7 @@
 import java.util.Properties;
 
 import org.eclipse.core.run​time.CoreException;
+import org.eclipse.core.run​time.IAdaptable;
 import org.eclipse.core.run​time.IProgressMonito​r;
 import org.eclipse.core.run​time.IStatus;
 import org.eclipse.core.run​time.MultiStatus;
@@ -25,6 +26,7 @@
 import org.eclipse.core.run​time.PlatformObject;​
 import org.eclipse.core.run​time.Status;
 import org.eclipse.team.cor​e.TeamException;
+import org.tigris.subversio​n.subclipse.core.ISV​NFolder;
 import org.tigris.subversio​n.subclipse.core.ISV​NRemoteFolder;
 import org.tigris.subversio​n.subclipse.core.ISV​NRemoteResource;
 import org.tigris.subversio​n.subclipse.core.ISV​NRepositoryLocation;​
@@ -51,7 +53,7 @@
  * notify the authenticator so cached properties can be cleared
  *
  */
-public class SVNRepositoryLocation extends PlatformObject implements ISVNRepositoryLocation, IUserInfo {
+public class SVNRepositoryLocation implements ISVNRepositoryLocation, IUserInfo, IAdaptable {
 
     private String user;
     private String password;
@@ -86,7 +88,7 @@
      * Create a SVNRepositoryLocation from its composite parts.
      */
     private SVNRepositoryLocation(String user, String password, URL url) {
- this.user = user;
+ this.user = user;
         this.password = password;
         this.url = url;
             
@@ -126,11 +128,15 @@
     
     
     public ISVNRemoteFolder getRootFolder() {
- // refresh it so that members don't return always the same remote resources ...
- rootFolder.refresh();
+// // refresh it so that members don't return always the same remote resources ...
+// rootFolder.refresh();
         return rootFolder;
     }
     
+ public void refreshRootFolder() {
+ rootFolder.refresh();
+ }
+
     
     /*
      * @see ISVNRepositoryLocati​on#members(IProgress​Monitor)
@@ -403,6 +409,12 @@
 // return null;
 // }
 // }
-
+
+ public Object getAdapter(Class adapter) {
+ if (adapter == ISVNRemoteFolder.class)
+ return rootFolder;
+ else
+ return Platform.getAdapterM​anager().getAdapter(​this, adapter);
+ }
 
 }

Modified: trunk/subclipse/core​/src/org/tigris/subv​ersion/subclipse/cor​e/resources/RemoteFo​lder.java
====================​====================​====================​==================
--- trunk/subclipse/core​/src/org/tigris/subv​ersion/subclipse/cor​e/resources/RemoteFo​lder.java (original)
+++ trunk/subclipse/core​/src/org/tigris/subv​ersion/subclipse/cor​e/resources/RemoteFo​lder.java Mon Jun 30 14:14:27 2003
@@ -190,15 +190,11 @@
         boolean includeFolders = (((flags & FOLDER_MEMBERS) != 0) || ((flags & (FILE_MEMBERS | FOLDER_MEMBERS)) == 0));
         boolean includeManaged = (((flags & MANAGED_MEMBERS) != 0) || ((flags & (MANAGED_MEMBERS | UNMANAGED_MEMBERS | IGNORED_MEMBERS)) == 0));
         boolean includeUnmanaged = (((flags & UNMANAGED_MEMBERS) != 0) || ((flags & (MANAGED_MEMBERS | UNMANAGED_MEMBERS | IGNORED_MEMBERS)) == 0));
- boolean includeIgnored = ((flags & IGNORED_MEMBERS) != 0);
         for (int i = 0; i < resources.length; i++) {
             ISVNResource svnResource = resources[i];
             if ((includeFiles && ( ! svnResource.isFolder()))
                     || (includeFolders && (svnResource.isFolder()))) {
- boolean isManaged = true; //svnResource.isManaged();
- boolean isIgnored = svnResource.isIgnored();
- if ((isManaged && includeManaged)|| (isIgnored && includeIgnored)
- || ( ! isManaged && ! isIgnored && includeUnmanaged)) {
+ if (includeManaged) {
                     result.add(svnResource);
                 }
                         
@@ -234,4 +230,25 @@
     public InputStream getContents(IProgressMonitor progress) throws TeamException {
         return null;
     }
+
+ /**
+ * creates a new remote folder
+ */
+ public void createRemoteFolder(String folderName, String message,IProgressMonitor monitor) throws SVNException {
+ IProgressMonitor progress = Policy.monitorFor(monitor);
+ progress.beginTask(P​olicy.bind("RemoteFo​lder.createRemoteFol​der"), 100); //$NON-NLS-1$
+
+ try {
+ SVNClientAdapter svnClient = getRepository().getSVNClient();
+ svnClient.mkdir(new URL(Util.appendPath(​getUrl().toString(),​folderName)),message​);
+ refresh();
+ } catch (MalformedURLException e) {
+ throw SVNException.wrapException(e);
+ } catch (ClientException e) {
+ throw SVNException.wrapException(e);
+ } finally {
+ progress.done();
+ }
+ }
+
 }

Modified: trunk/subclipse/core​/src/org/tigris/subv​ersion/subclipse/cor​e/resources/RemoteRe​source.java
====================​====================​====================​==================
--- trunk/subclipse/core​/src/org/tigris/subv​ersion/subclipse/cor​e/resources/RemoteRe​source.java (original)
+++ trunk/subclipse/core​/src/org/tigris/subv​ersion/subclipse/cor​e/resources/RemoteRe​source.java Mon Jun 30 14:14:27 2003
@@ -17,6 +17,7 @@
 import org.eclipse.core.run​time.IProgressMonito​r;
 import org.eclipse.core.run​time.PlatformObject;​
 import org.eclipse.team.cor​e.TeamException;
+import org.tigris.subversio​n.subclipse.core.ISV​NRemoteFolder;
 import org.tigris.subversio​n.subclipse.core.ISV​NRemoteResource;
 import org.tigris.subversio​n.subclipse.core.ISV​NRepositoryLocation;​
 import org.tigris.subversio​n.subclipse.core.Pol​icy;
@@ -104,20 +105,13 @@
         return parent.exists(this, monitor);
     }
     
- // /*
- // * @see ISVNResource#getParent()
- // */
- // public ISVNFolder getParent() {
- // return parent;
- // }
- //
     /*
- * @see ISVNResource#isIgnored()
+ * @see ISVNRemoteResource#getParent()
      */
- public boolean isIgnored() {
- return false;
+ public ISVNRemoteFolder getParent() {
+ return parent;
     }
-
+
     public boolean equals(Object target) {
         if (this == target)
             return true;

--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: cvs-unsubscribe@subc​lipse.tigris.org
For additional commands, e-mail: cvs-help at subclipse dot tigris dot org

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

subclipse commit: rev 19 - in trunk/subclipse/core/src/org/tigris/subversion/subclipse/core: . repo resources cchab chabanois cédric 2003-06-30 12:14:33 PDT
Messages per page: