incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asa...@apache.org
Subject svn commit: r1402080 - in /sling/whiteboard/asanso/plugins: ./ eclipse/ eclipse/slingclipse-api/ eclipse/slingclipse-api/META-INF/ eclipse/slingclipse-api/src/ eclipse/slingclipse-api/src/org/ eclipse/slingclipse-api/src/org/apache/ eclipse/slingclipse...
Date Thu, 25 Oct 2012 10:15:58 GMT
Author: asanso
Date: Thu Oct 25 10:15:56 2012
New Revision: 1402080

URL: http://svn.apache.org/viewvc?rev=1402080&view=rev
Log:
initial commit of an experimental plugin for Eclipse for Sling

Added:
    sling/whiteboard/asanso/plugins/
    sling/whiteboard/asanso/plugins/eclipse/
    sling/whiteboard/asanso/plugins/eclipse/slingclipse-api/
    sling/whiteboard/asanso/plugins/eclipse/slingclipse-api/META-INF/
    sling/whiteboard/asanso/plugins/eclipse/slingclipse-api/META-INF/MANIFEST.MF
    sling/whiteboard/asanso/plugins/eclipse/slingclipse-api/build.properties
    sling/whiteboard/asanso/plugins/eclipse/slingclipse-api/src/
    sling/whiteboard/asanso/plugins/eclipse/slingclipse-api/src/org/
    sling/whiteboard/asanso/plugins/eclipse/slingclipse-api/src/org/apache/
    sling/whiteboard/asanso/plugins/eclipse/slingclipse-api/src/org/apache/sling/
    sling/whiteboard/asanso/plugins/eclipse/slingclipse-api/src/org/apache/sling/slingclipse/
    sling/whiteboard/asanso/plugins/eclipse/slingclipse-api/src/org/apache/sling/slingclipse/api/
    sling/whiteboard/asanso/plugins/eclipse/slingclipse-api/src/org/apache/sling/slingclipse/api/FileInfo.java
    sling/whiteboard/asanso/plugins/eclipse/slingclipse-api/src/org/apache/sling/slingclipse/api/Repository.java
    sling/whiteboard/asanso/plugins/eclipse/slingclipse-api/src/org/apache/sling/slingclipse/api/RepositoryInfo.java
    sling/whiteboard/asanso/plugins/eclipse/slingclipse-api/src/org/apache/sling/slingclipse/api/RepositoryResponse.java
    sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/
    sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/META-INF/
    sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/META-INF/MANIFEST.MF
    sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/OSGI-INF/
    sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/OSGI-INF/component.xml
    sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/build.properties
    sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/src/
    sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/src/org/
    sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/src/org/apache/
    sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/src/org/apache/sling/
    sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/src/org/apache/sling/slingclipse/
    sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/src/org/apache/sling/slingclipse/http/
    sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/src/org/apache/sling/slingclipse/http/impl/
    sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/src/org/apache/sling/slingclipse/http/impl/AbstractRepository.java
    sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/src/org/apache/sling/slingclipse/http/impl/RepositoryImpl.java
    sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/
    sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/META-INF/
    sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/META-INF/MANIFEST.MF
    sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/OSGI-INF/
    sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/OSGI-INF/component.xml
    sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/build.properties
    sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/plugin.xml
    sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/
    sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/
    sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/
    sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/
    sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/
    sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/SlingclipseListener.java
    sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/SlingclipsePlugin.java
    sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/SlingclipseStrartup.java
    sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/helper/
    sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/helper/SlingclipseHelper.java
    sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/preferences/
    sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/preferences/PreferenceInitializer.java
    sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/preferences/PreferencesMessages.java
    sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/preferences/SlingclipsePreferencePage.java

Added: sling/whiteboard/asanso/plugins/eclipse/slingclipse-api/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/sling/whiteboard/asanso/plugins/eclipse/slingclipse-api/META-INF/MANIFEST.MF?rev=1402080&view=auto
==============================================================================
--- sling/whiteboard/asanso/plugins/eclipse/slingclipse-api/META-INF/MANIFEST.MF (added)
+++ sling/whiteboard/asanso/plugins/eclipse/slingclipse-api/META-INF/MANIFEST.MF Thu Oct 25
10:15:56 2012
@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Slingclipse-api
+Bundle-SymbolicName: org.apache.sling.slingclipse.api
+Bundle-Version: 1.0.0.qualifier
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Export-Package: org.apache.sling.slingclipse.api

Added: sling/whiteboard/asanso/plugins/eclipse/slingclipse-api/build.properties
URL: http://svn.apache.org/viewvc/sling/whiteboard/asanso/plugins/eclipse/slingclipse-api/build.properties?rev=1402080&view=auto
==============================================================================
--- sling/whiteboard/asanso/plugins/eclipse/slingclipse-api/build.properties (added)
+++ sling/whiteboard/asanso/plugins/eclipse/slingclipse-api/build.properties Thu Oct 25 10:15:56
2012
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .

Added: sling/whiteboard/asanso/plugins/eclipse/slingclipse-api/src/org/apache/sling/slingclipse/api/FileInfo.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/asanso/plugins/eclipse/slingclipse-api/src/org/apache/sling/slingclipse/api/FileInfo.java?rev=1402080&view=auto
==============================================================================
--- sling/whiteboard/asanso/plugins/eclipse/slingclipse-api/src/org/apache/sling/slingclipse/api/FileInfo.java
(added)
+++ sling/whiteboard/asanso/plugins/eclipse/slingclipse-api/src/org/apache/sling/slingclipse/api/FileInfo.java
Thu Oct 25 10:15:56 2012
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sling.slingclipse.api;
+
+public class FileInfo {
+	
+	private String location;
+	private String name;
+	private String relativeLocation;
+	
+	public FileInfo(String location, String relativeLocation,String name) {
+		super();
+		this.location = location;
+		this.name = name;
+		this.relativeLocation = relativeLocation;
+	}
+
+	public String getLocation() {
+		return location;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public String getRelativeLocation() {
+		return relativeLocation;
+	}	
+}

Added: sling/whiteboard/asanso/plugins/eclipse/slingclipse-api/src/org/apache/sling/slingclipse/api/Repository.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/asanso/plugins/eclipse/slingclipse-api/src/org/apache/sling/slingclipse/api/Repository.java?rev=1402080&view=auto
==============================================================================
--- sling/whiteboard/asanso/plugins/eclipse/slingclipse-api/src/org/apache/sling/slingclipse/api/Repository.java
(added)
+++ sling/whiteboard/asanso/plugins/eclipse/slingclipse-api/src/org/apache/sling/slingclipse/api/Repository.java
Thu Oct 25 10:15:56 2012
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sling.slingclipse.api;
+
+public interface Repository {
+	
+	//TODO change with properties
+	public void setRepositoryInfo(RepositoryInfo repositoryInfo);
+
+	public void addNode(FileInfo fileInfo);
+	
+	public void deleteNode(FileInfo fileInfo);
+}

Added: sling/whiteboard/asanso/plugins/eclipse/slingclipse-api/src/org/apache/sling/slingclipse/api/RepositoryInfo.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/asanso/plugins/eclipse/slingclipse-api/src/org/apache/sling/slingclipse/api/RepositoryInfo.java?rev=1402080&view=auto
==============================================================================
--- sling/whiteboard/asanso/plugins/eclipse/slingclipse-api/src/org/apache/sling/slingclipse/api/RepositoryInfo.java
(added)
+++ sling/whiteboard/asanso/plugins/eclipse/slingclipse-api/src/org/apache/sling/slingclipse/api/RepositoryInfo.java
Thu Oct 25 10:15:56 2012
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sling.slingclipse.api;
+
+public class RepositoryInfo {
+	
+	private String username;
+	private String password;
+	private String url;
+	
+	public RepositoryInfo(String username, String password, String url) {
+		super();
+		this.username = username;
+		this.password = password;
+		this.url = url;
+	}
+	
+	public String getUsername() {
+		return username;
+	}
+
+	public String getPassword() {
+		return password;
+	}
+
+	public String getUrl() {
+		return url;
+	}
+	
+}

Added: sling/whiteboard/asanso/plugins/eclipse/slingclipse-api/src/org/apache/sling/slingclipse/api/RepositoryResponse.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/asanso/plugins/eclipse/slingclipse-api/src/org/apache/sling/slingclipse/api/RepositoryResponse.java?rev=1402080&view=auto
==============================================================================
--- sling/whiteboard/asanso/plugins/eclipse/slingclipse-api/src/org/apache/sling/slingclipse/api/RepositoryResponse.java
(added)
+++ sling/whiteboard/asanso/plugins/eclipse/slingclipse-api/src/org/apache/sling/slingclipse/api/RepositoryResponse.java
Thu Oct 25 10:15:56 2012
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sling.slingclipse.api;
+
+public class RepositoryResponse {
+	
+	public static int STATUS_OK=0;
+	public static int STATUS_FAILED=-1;
+	
+	private int state;
+	private String message;
+ 	
+	public RepositoryResponse(int state) {
+		super();
+		this.state = state;
+	}
+	public int getState() {
+		return state;
+	}
+	public void setState(int state) {
+		this.state = state;
+	}
+	public String getMessage() {
+		return message;
+	}
+	public void setMessage(String message) {
+		this.message = message;
+	}
+}

Added: sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/META-INF/MANIFEST.MF?rev=1402080&view=auto
==============================================================================
--- sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/META-INF/MANIFEST.MF (added)
+++ sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/META-INF/MANIFEST.MF Thu Oct
25 10:15:56 2012
@@ -0,0 +1,14 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Slingclipse-http
+Bundle-SymbolicName: org.apache.sling.slingclipse.http
+Bundle-Version: 1.0.0.qualifier
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.apache.sling.slingclipse.api;bundle-version="1.0.0",
+ org.apache.commons.httpclient;bundle-version="3.1.0",
+ org.eclipse.equinox.ds;bundle-version="1.2.1",
+ org.eclipse.osgi.services;bundle-version="3.2.100"
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Service-Component: OSGI-INF/component.xml

Added: sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/OSGI-INF/component.xml
URL: http://svn.apache.org/viewvc/sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/OSGI-INF/component.xml?rev=1402080&view=auto
==============================================================================
--- sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/OSGI-INF/component.xml (added)
+++ sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/OSGI-INF/component.xml Thu Oct
25 10:15:56 2012
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="false" name="org.apache.sling.slingclipse.http">
+   <implementation class="org.apache.sling.slingclipse.http.impl.RepositoryImpl"/>
+   <service>
+      <provide interface="org.apache.sling.slingclipse.api.Repository"/>
+   </service>
+</scr:component>

Added: sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/build.properties
URL: http://svn.apache.org/viewvc/sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/build.properties?rev=1402080&view=auto
==============================================================================
--- sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/build.properties (added)
+++ sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/build.properties Thu Oct 25 10:15:56
2012
@@ -0,0 +1,5 @@
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               OSGI-INF/
+source.. = src/

Added: sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/src/org/apache/sling/slingclipse/http/impl/AbstractRepository.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/src/org/apache/sling/slingclipse/http/impl/AbstractRepository.java?rev=1402080&view=auto
==============================================================================
--- sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/src/org/apache/sling/slingclipse/http/impl/AbstractRepository.java
(added)
+++ sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/src/org/apache/sling/slingclipse/http/impl/AbstractRepository.java
Thu Oct 25 10:15:56 2012
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sling.slingclipse.http.impl;
+
+import org.apache.sling.slingclipse.api.Repository;
+import org.apache.sling.slingclipse.api.RepositoryInfo;
+//TODO move to api?
+public abstract class AbstractRepository implements Repository{
+	
+	protected RepositoryInfo repositoryInfo;
+	
+	public void setRepositoryInfo(RepositoryInfo repositoryInfo){
+		this.repositoryInfo=repositoryInfo;
+	}
+ 
+}

Added: sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/src/org/apache/sling/slingclipse/http/impl/RepositoryImpl.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/src/org/apache/sling/slingclipse/http/impl/RepositoryImpl.java?rev=1402080&view=auto
==============================================================================
--- sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/src/org/apache/sling/slingclipse/http/impl/RepositoryImpl.java
(added)
+++ sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/src/org/apache/sling/slingclipse/http/impl/RepositoryImpl.java
Thu Oct 25 10:15:56 2012
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sling.slingclipse.http.impl;
+
+import java.io.File;
+
+import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.UsernamePasswordCredentials;
+import org.apache.commons.httpclient.auth.AuthScope;
+import org.apache.commons.httpclient.methods.PostMethod;
+import org.apache.commons.httpclient.methods.multipart.FilePart;
+import org.apache.commons.httpclient.methods.multipart.MultipartRequestEntity;
+import org.apache.commons.httpclient.methods.multipart.Part;
+import org.apache.commons.httpclient.methods.multipart.StringPart;
+import org.apache.sling.slingclipse.api.FileInfo;
+
+public class RepositoryImpl extends AbstractRepository{
+	
+	private final HttpClient httpClient = new HttpClient();	
+
+	@Override
+	public void addNode(FileInfo fileInfo) {
+		PostMethod post = new PostMethod(repositoryInfo.getUrl()+fileInfo.getRelativeLocation());
+		try{
+			File f=new File(fileInfo.getLocation());
+ 			Part[] parts ={ new FilePart(fileInfo.getName(), f)};
+			post.setRequestEntity(new MultipartRequestEntity(parts,post.getParams()));
+			httpClient.getState().setCredentials(AuthScope.ANY, new UsernamePasswordCredentials(repositoryInfo.getUsername(),repositoryInfo.getPassword()));
+			httpClient.getParams().setAuthenticationPreemptive(true);
+			int responseStatus=httpClient.executeMethod(post);
+			//TODO handle the response status
+		} catch(Exception e){
+			//TODO handle the error
+		}finally{
+			post.releaseConnection();
+		}
+	}
+
+	@Override
+	public void deleteNode(FileInfo fileInfo) {
+		PostMethod post = new PostMethod(repositoryInfo.getUrl()+fileInfo.getRelativeLocation()+"/"+fileInfo.getName());
+		try{
+			Part[] parts ={new StringPart(":operation", "delete")};
+			post.setRequestEntity(new MultipartRequestEntity(parts,post.getParams()));
+			httpClient.getState().setCredentials(AuthScope.ANY, new UsernamePasswordCredentials(repositoryInfo.getUsername(),repositoryInfo.getPassword()));
+			httpClient.getParams().setAuthenticationPreemptive(true);
+			int responseStatus=httpClient.executeMethod(post);
+			//TODO handle the response status
+		} catch(Exception e){
+			//TODO handle the error
+		}finally{
+			post.releaseConnection();
+		}
+		
+	}
+
+}

Added: sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/META-INF/MANIFEST.MF?rev=1402080&view=auto
==============================================================================
--- sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/META-INF/MANIFEST.MF (added)
+++ sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/META-INF/MANIFEST.MF Thu Oct
25 10:15:56 2012
@@ -0,0 +1,18 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Slingclipse-plugin
+Bundle-SymbolicName: org.apache.sling.slingclipse;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.apache.sling.slingclipse.SlingclipsePlugin
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.core.resources;bundle-version="3.6.0",
+ org.apache.commons.httpclient;bundle-version="3.1.0",
+ org.apache.sling.slingclipse.api;bundle-version="1.0.0",
+ org.eclipse.equinox.ds;bundle-version="1.2.1",
+ org.eclipse.osgi.services;bundle-version="3.2.100"
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ClassPath: .
+Service-Component: OSGI-INF/component.xml
+Import-Package: org.osgi.service.component;version="1.1.0"

Added: sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/OSGI-INF/component.xml
URL: http://svn.apache.org/viewvc/sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/OSGI-INF/component.xml?rev=1402080&view=auto
==============================================================================
--- sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/OSGI-INF/component.xml (added)
+++ sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/OSGI-INF/component.xml Thu
Oct 25 10:15:56 2012
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="org.apache.sling.slingclipse">
+   <implementation class="org.apache.sling.slingclipse.SlingclipsePlugin"/>
+ 
+   <reference cardinality="1..1" interface="org.apache.sling.slingclipse.api.Repository"

+   name="Command" policy="static"
+   bind="setRepository"
+      unbind="unsetRepository"
+    />
+</scr:component>

Added: sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/build.properties
URL: http://svn.apache.org/viewvc/sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/build.properties?rev=1402080&view=auto
==============================================================================
--- sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/build.properties (added)
+++ sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/build.properties Thu Oct 25
10:15:56 2012
@@ -0,0 +1,8 @@
+output.. = bin/
+bin.includes = plugin.xml,\
+               META-INF/,\
+               .,\
+               OSGI-INF/
+jars.compile.order = .,\
+                     commons-httpclient.jar
+source.. = src/

Added: sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/plugin.xml
URL: http://svn.apache.org/viewvc/sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/plugin.xml?rev=1402080&view=auto
==============================================================================
--- sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/plugin.xml (added)
+++ sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/plugin.xml Thu Oct 25 10:15:56
2012
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+   <extension
+         id="org.apache.sling.slingclipse.preferences"
+         name="Slingclipse Preferences"
+         point="org.eclipse.ui.preferencePages">
+      <page
+            name="Slingclipse"
+            class="org.apache.sling.slingclipse.preferences.SlingclipsePreferencePage"
+            id="org.apache.sling.slingclipse.preferences.defaultPreferences">
+      </page>
+   </extension>
+   <extension
+         point="org.eclipse.core.runtime.preferences">
+      <initializer
+            class="org.apache.sling.slingclipse.preferences.PreferenceInitializer">
+      </initializer>
+   </extension>
+   <extension
+         point="org.eclipse.ui.startup">
+      <startup
+            class="org.apache.sling.slingclipse.SlingclipseStrartup">
+      </startup>
+   </extension>
+
+</plugin>

Added: sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/SlingclipseListener.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/SlingclipseListener.java?rev=1402080&view=auto
==============================================================================
--- sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/SlingclipseListener.java
(added)
+++ sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/SlingclipseListener.java
Thu Oct 25 10:15:56 2012
@@ -0,0 +1,102 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sling.slingclipse;
+
+import org.apache.sling.slingclipse.api.Repository;
+import org.apache.sling.slingclipse.api.FileInfo;
+import org.apache.sling.slingclipse.api.RepositoryInfo;
+import org.apache.sling.slingclipse.helper.SlingclipseHelper;
+import org.apache.sling.slingclipse.preferences.PreferencesMessages;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceChangeEvent;
+import org.eclipse.core.resources.IResourceChangeListener;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.IResourceDeltaVisitor;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.preference.IPreferenceStore;
+
+/**
+ * @author asanso
+ *
+ */
+public class SlingclipseListener implements IResourceChangeListener {
+
+	@Override
+	public void resourceChanged(IResourceChangeEvent event) {
+		IResourceDelta rootDelta = event.getDelta();
+		try {
+			rootDelta.accept(buildVisitor());
+		} catch (CoreException e) {
+			// TODO should we do something here in case this fails ?
+			e.printStackTrace();
+		}
+	}
+
+	protected IResourceDeltaVisitor buildVisitor() {
+		IResourceDeltaVisitor result = new IResourceDeltaVisitor() {
+
+			@Override
+			public boolean visit(IResourceDelta delta) throws CoreException { 
+				
+				IPreferenceStore store = SlingclipsePlugin.getDefault().getPreferenceStore();
+				
+				if (!store.getBoolean(PreferencesMessages.REPOSITORY_AUTO_SYNC.getKey())){
+					return true;
+				}
+ 				
+				if (delta.getFlags() == IResourceDelta.NO_CHANGE
+						&& (delta.getKind() != IResourceDelta.ADDED && delta
+								.getKind() != IResourceDelta.REMOVED)) {
+					return true;
+				}
+				
+				IResource resource = delta.getResource();
+ 				String path = resource.getLocation().toString();
+				
+ 				if (SlingclipseHelper.isValidSlingProjectPath(path)) {
+					// TODO parent name clarify
+					String parentPath = resource.getParent().getFullPath().toString();
+ 
+					RepositoryInfo repositoryInfo = new RepositoryInfo(
+							store.getString(PreferencesMessages.USERNAME
+									.getKey()),
+							store.getString(PreferencesMessages.PASSWORD
+									.getKey()),
+							store.getString(PreferencesMessages.REPOSITORY_URL
+									.getKey()));
+
+					Repository repository = SlingclipsePlugin.getDefault().getRepository();
+
+					FileInfo fileInfo = new FileInfo(path,SlingclipseHelper.getSlingProjectPath(parentPath),resource.getName());
+
+					repository.setRepositoryInfo(repositoryInfo);
+					
+					if (delta.getKind() == IResourceDelta.REMOVED) {
+						repository.deleteNode(fileInfo);
+					} else {
+						repository.addNode(fileInfo);
+					}
+
+				}
+ 				return true;
+ 				 
+			}
+			 
+		};
+		return result;
+	}
+}

Added: sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/SlingclipsePlugin.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/SlingclipsePlugin.java?rev=1402080&view=auto
==============================================================================
--- sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/SlingclipsePlugin.java
(added)
+++ sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/SlingclipsePlugin.java
Thu Oct 25 10:15:56 2012
@@ -0,0 +1,101 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sling.slingclipse;
+
+import org.apache.sling.slingclipse.api.Repository;
+import org.eclipse.core.resources.IResourceChangeListener;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class SlingclipsePlugin extends AbstractUIPlugin {
+
+	// The plug-in ID
+	public static final String PLUGIN_ID = "org.apache.sling.slingclipse"; //$NON-NLS-1$
+
+	// The shared instance
+	private static SlingclipsePlugin plugin;
+
+	private IResourceChangeListener listener;
+
+	//TODO is fine to be static?
+	private static Repository repository;
+
+	/**
+	 * The constructor
+	 */
+	public SlingclipsePlugin() {
+		listener= new SlingclipseListener();
+	}
+
+	/*
+	 * (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;
+		ResourcesPlugin.getWorkspace().addResourceChangeListener(listener);
+	}
+
+	/*
+	 * (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);
+		ResourcesPlugin.getWorkspace().removeResourceChangeListener(listener);
+	}
+
+	/**
+	 * Returns the shared instance
+	 *
+	 * @return the shared instance
+	 */
+	public static SlingclipsePlugin getDefault() {
+		return plugin;
+	}
+
+	/**
+	 * Returns an image descriptor for the image file at the given
+	 * plug-in relative path
+	 *
+	 * @param path the path
+	 * @return the image descriptor
+	 */
+	public static ImageDescriptor getImageDescriptor(String path) {
+		return imageDescriptorFromPlugin(PLUGIN_ID, path);
+	}
+
+	public void setRepository(Repository repository ){
+		this.repository=repository;
+
+	}
+
+	public void unsetRepository(Repository repository){
+		this.repository= null;
+	}
+
+	public Repository getRepository() {
+		return this.repository;
+	}
+}

Added: sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/SlingclipseStrartup.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/SlingclipseStrartup.java?rev=1402080&view=auto
==============================================================================
--- sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/SlingclipseStrartup.java
(added)
+++ sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/SlingclipseStrartup.java
Thu Oct 25 10:15:56 2012
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sling.slingclipse;
+
+import org.eclipse.ui.IStartup;
+
+public class SlingclipseStrartup implements IStartup{
+
+	@Override
+	public void earlyStartup() {
+		// TODO should we do something here?
+	}
+
+}

Added: sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/helper/SlingclipseHelper.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/helper/SlingclipseHelper.java?rev=1402080&view=auto
==============================================================================
--- sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/helper/SlingclipseHelper.java
(added)
+++ sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/helper/SlingclipseHelper.java
Thu Oct 25 10:15:56 2012
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sling.slingclipse.helper;
+
+public class SlingclipseHelper {
+	
+	public static final String JCR_ROOT= "jcr_root";
+	
+	public static boolean isValidSlingProjectPath(String path){
+		//TODO verify only one occurrence of JCR_ROOT.		
+		return path.indexOf(JCR_ROOT)!= -1;
+	}
+	
+	public static String getSlingProjectPath(String path){
+		int index= path.indexOf(JCR_ROOT)+JCR_ROOT.length();
+        return path.substring(index);
+	}
+
+}

Added: sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/preferences/PreferenceInitializer.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/preferences/PreferenceInitializer.java?rev=1402080&view=auto
==============================================================================
--- sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/preferences/PreferenceInitializer.java
(added)
+++ sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/preferences/PreferenceInitializer.java
Thu Oct 25 10:15:56 2012
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sling.slingclipse.preferences;
+
+import org.apache.sling.slingclipse.SlingclipsePlugin;
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.eclipse.jface.preference.IPreferenceStore;
+
+/**
+ * Class used to initialize default preference values.
+ */
+public class PreferenceInitializer extends AbstractPreferenceInitializer {
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#
+	 * initializeDefaultPreferences()
+	 */
+	public void initializeDefaultPreferences() {
+		IPreferenceStore store = SlingclipsePlugin.getDefault()
+				.getPreferenceStore();
+		store.setDefault(PreferencesMessages.REPOSITORY_URL.getKey(),
+				"http://localhost:8080");
+		store.setDefault(PreferencesMessages.USERNAME.getKey(), "admin");
+		store.setDefault(PreferencesMessages.PASSWORD.getKey(), "admin");
+		store.setDefault(PreferencesMessages.REPOSITORY_AUTO_SYNC.getKey(), true);
+		
+	}
+
+}

Added: sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/preferences/PreferencesMessages.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/preferences/PreferencesMessages.java?rev=1402080&view=auto
==============================================================================
--- sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/preferences/PreferencesMessages.java
(added)
+++ sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/preferences/PreferencesMessages.java
Thu Oct 25 10:15:56 2012
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sling.slingclipse.preferences;
+
+public enum PreferencesMessages {
+	PASSWORD("password"), REPOSITORY_URL("repository.url"), USERNAME("username"), REPOSITORY_AUTO_SYNC("repository.auto.sync");
+
+	private final String key;
+
+	private PreferencesMessages(String key) {
+		this.key = key;
+	}
+
+	public String getKey() {
+		return this.key;
+	}
+}

Added: sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/preferences/SlingclipsePreferencePage.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/preferences/SlingclipsePreferencePage.java?rev=1402080&view=auto
==============================================================================
--- sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/preferences/SlingclipsePreferencePage.java
(added)
+++ sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/preferences/SlingclipsePreferencePage.java
Thu Oct 25 10:15:56 2012
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sling.slingclipse.preferences;
+
+import org.apache.sling.slingclipse.SlingclipsePlugin;
+import org.eclipse.jface.preference.*;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.eclipse.ui.IWorkbench;
+
+public class SlingclipsePreferencePage
+	extends FieldEditorPreferencePage
+	implements IWorkbenchPreferencePage {
+
+	public SlingclipsePreferencePage() {
+		super(GRID);
+		setPreferenceStore(SlingclipsePlugin.getDefault().getPreferenceStore());
+		setDescription("Version 0.0.1");
+	}
+	
+	/**
+	 * Creates the field editors. Field editors are abstractions of
+	 * the common GUI blocks needed to manipulate various types
+	 * of preferences. Each field editor knows how to save and
+	 * restore itself.
+	 */
+	public void createFieldEditors() {
+		Composite composite = getFieldEditorParent();
+		addField(new StringFieldEditor(
+				PreferencesMessages.REPOSITORY_URL.getKey(),
+				"Sling Repository URL:", composite));
+		addField(new StringFieldEditor(PreferencesMessages.USERNAME.getKey(),
+				"Username:", composite));
+		addField(new StringFieldEditor(PreferencesMessages.PASSWORD.getKey(),
+				"Password:", composite));
+		addField(new BooleanFieldEditor(
+				PreferencesMessages.REPOSITORY_AUTO_SYNC.getKey(),
+				"&Sync the repository at every save",
+				composite));
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+	 */
+	public void init(IWorkbench workbench) {
+	}
+	
+}
\ No newline at end of file



Mime
View raw message