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
1 /*
2  * Copyright (c) 2003-2004 Christopher Lenz and others.
3  * All rights reserved. This program and the accompanying materials 
4  * are made available under the terms of the Common Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/cpl-v10.html
7  * 
8  * Contributors:
9  *     Christopher Lenz - initial API
10  * 
11  * $Id: IProfileManager.java,v 1.1 2004-09-02 18:07:14 jsurfer Exp $
12  */
13
14 package net.sourceforge.phpeclipse.css.core.profiles;
15
16 import org.eclipse.core.resources.IResource;
17
18 /**
19  * Manages the CSS profiles.
20  */
21 public interface IProfileManager {
22
23         /**
24          * Returns the list of available profiles.
25          * 
26          * @return an array containing the descriptors of all available profiles
27          */
28         IProfileDescriptor[] getProfileDescriptors();
29
30         /**
31          * Returns the profile that is selected for the specified resource or 
32          * project.
33          * 
34          * @param resource the resource for which the profile should be retrieved,
35          *        or <code>null</code> to retrieve the default profile as specified 
36          *        in the plugin preferences
37          * @return the profile
38          */
39         IProfile getProfile(IResource resource);
40
41         /**
42          * Sets the profile that should be used for the specified resource. If the 
43          * resource is an <code>IProject</code>, the profile will be used as the
44          * default profile for all resources in the project. Otherwise, it will be
45          * used only for the resource. If the resource is <code>null</code>, the 
46          * profile will be selected as the global default profile.
47          * 
48          * @param resource
49          * @param profileId The ID of the profile
50          */
51         void setProfile(IResource resource, String profileId);
52
53 }