intial source from ttp://www.sf.net/projects/wdte
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.css.core / src / net / sourceforge / phpeclipse / css / core / profiles / IProfileManager.java
diff --git a/archive/net.sourceforge.phpeclipse.css.core/src/net/sourceforge/phpeclipse/css/core/profiles/IProfileManager.java b/archive/net.sourceforge.phpeclipse.css.core/src/net/sourceforge/phpeclipse/css/core/profiles/IProfileManager.java
new file mode 100644 (file)
index 0000000..b4400de
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2003-2004 Christopher Lenz and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ * 
+ * Contributors:
+ *     Christopher Lenz - initial API
+ * 
+ * $Id: IProfileManager.java,v 1.1 2004-09-02 18:07:14 jsurfer Exp $
+ */
+
+package net.sourceforge.phpeclipse.css.core.profiles;
+
+import org.eclipse.core.resources.IResource;
+
+/**
+ * Manages the CSS profiles.
+ */
+public interface IProfileManager {
+
+       /**
+        * Returns the list of available profiles.
+        * 
+        * @return an array containing the descriptors of all available profiles
+        */
+       IProfileDescriptor[] getProfileDescriptors();
+
+       /**
+        * Returns the profile that is selected for the specified resource or 
+        * project.
+        * 
+        * @param resource the resource for which the profile should be retrieved,
+        *        or <code>null</code> to retrieve the default profile as specified 
+        *        in the plugin preferences
+        * @return the profile
+        */
+       IProfile getProfile(IResource resource);
+
+       /**
+        * Sets the profile that should be used for the specified resource. If the 
+        * resource is an <code>IProject</code>, the profile will be used as the
+        * default profile for all resources in the project. Otherwise, it will be
+        * used only for the resource. If the resource is <code>null</code>, the 
+        * profile will be selected as the global default profile.
+        * 
+        * @param resource
+        * @param profileId The ID of the profile
+        */
+       void setProfile(IResource resource, String profileId);
+
+}