KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > core > resources > IWorkspaceDescription


1 /*******************************************************************************
2  * Copyright (c) 2000, 2007 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.core.resources;
12
13 /**
14  * A workspace description represents the workspace preferences. It can be
15  * used to query the current preferences and set new ones. The workspace
16  * preference values are stored in the preference store and are also accessible
17  * via the preference mechanism. Constants for the preference keys are found
18  * on the <code>ResourcesPlugin</code> class.
19  * <p>
20  * This interface is not intended to be implemented by clients.
21  * </p>
22  *
23  * @see IWorkspace#getDescription()
24  * @see IWorkspace#setDescription(IWorkspaceDescription)
25  * @see IWorkspace#newProjectDescription(String)
26  */

27 public interface IWorkspaceDescription {
28     /**
29      * Returns the order in which projects in the workspace should be built.
30      * The returned value is <code>null</code> if the workspace's default build
31      * order is being used.
32      *
33      * @return the names of projects in the order they will be built,
34      * or <code>null</code> if the default build order should be used
35      * @see #setBuildOrder(String[])
36      * @see ResourcesPlugin#PREF_BUILD_ORDER
37      */

38     public String JavaDoc[] getBuildOrder();
39
40     /**
41      * Returns the maximum length of time, in milliseconds, a file state should be
42      * kept in the local history.
43      *
44      * @return the maximum time a file state should be kept in the local history
45      * represented in milliseconds
46      * @see #setFileStateLongevity(long)
47      * @see ResourcesPlugin#PREF_FILE_STATE_LONGEVITY
48      */

49     public long getFileStateLongevity();
50
51     /**
52      * Returns the maximum number of times that the workspace should rebuild when
53      * builders affect projects that have already been built.
54      *
55      * @return the maximum number of times that the workspace should rebuild when
56      * builders affect projects that have already been built.
57      * @see #setMaxBuildIterations(int)
58      * @see ResourcesPlugin#PREF_MAX_BUILD_ITERATIONS
59      * @since 2.1
60      */

61     public int getMaxBuildIterations();
62
63     /**
64      * Returns the maximum number of states per file that can be stored in the local history.
65      *
66      * @return the maximum number of states per file that can be stored in the local history
67      * @see #setMaxFileStates(int)
68      * @see ResourcesPlugin#PREF_MAX_FILE_STATES
69      */

70     public int getMaxFileStates();
71
72     /**
73      * Returns the maximum permitted size of a file, in bytes, to be stored in the
74      * local history.
75      *
76      * @return the maximum permitted size of a file to be stored in the local history
77      * @see #setMaxFileStateSize(long)
78      * @see ResourcesPlugin#PREF_MAX_FILE_STATE_SIZE
79      */

80     public long getMaxFileStateSize();
81
82     /**
83      * Returns the interval between automatic workspace snapshots.
84      *
85      * @return the amount of time in milliseconds between automatic workspace snapshots
86      * @see #setSnapshotInterval(long)
87      * @see ResourcesPlugin#PREF_SNAPSHOT_INTERVAL
88      * @since 2.0
89      */

90     public long getSnapshotInterval();
91
92     /**
93      * Returns whether this workspace performs autobuilds.
94      *
95      * @return <code>true</code> if autobuilding is on, otherwise
96      * <code>false</code>
97      * @see #setAutoBuilding(boolean)
98      * @see ResourcesPlugin#PREF_AUTO_BUILDING
99      */

100     public boolean isAutoBuilding();
101
102     /**
103      * Records whether this workspace performs autobuilds.
104      * <p>
105      * When autobuild is on, any changes made to a project and its
106      * resources automatically triggers an incremental build of the workspace.
107      * </p>
108      * <p>
109      * Users must call <code>IWorkspace.setDescription</code> before changes
110      * made to this description take effect.
111      * </p>
112      *
113      * @param value <code>true</code> to turn on autobuilding,
114      * and <code>false</code> to turn it off
115      * @see IWorkspace#setDescription(IWorkspaceDescription)
116      * @see #isAutoBuilding()
117      * @see ResourcesPlugin#PREF_AUTO_BUILDING
118      */

119     public void setAutoBuilding(boolean value);
120
121     /**
122      * Sets the order in which projects in the workspace should be built.
123      * Projects not named in this list are built in a default order defined
124      * by the workspace. Set this value to <code>null</code> to use the
125      * default ordering for all projects. Projects not named in the list are
126      * built in unspecified order after all ordered projects.
127      * <p>
128      * Users must call <code>IWorkspace.setDescription</code> before changes
129      * made to this description take effect.
130      * </p>
131      *
132      * @param value the names of projects in the order in which they are built,
133      * or <code>null</code> to use the workspace's default order for all projects
134      * @see IWorkspace#setDescription(IWorkspaceDescription)
135      * @see #getBuildOrder()
136      * @see ResourcesPlugin#PREF_BUILD_ORDER
137      */

138     public void setBuildOrder(String JavaDoc[] value);
139
140     /**
141      * Sets the maximum time, in milliseconds, a file state should be kept in the
142      * local history.
143      * <p>
144      * Users must call <code>IWorkspace.setDescription</code> before changes
145      * made to this description take effect.
146      * </p>
147      *
148      * @param time the maximum number of milliseconds a file state should be
149      * kept in the local history
150      * @see IWorkspace#setDescription(IWorkspaceDescription)
151      * @see #getFileStateLongevity()
152      * @see ResourcesPlugin#PREF_FILE_STATE_LONGEVITY
153      */

154     public void setFileStateLongevity(long time);
155
156     /**
157      * Sets the maximum number of times that the workspace should rebuild when
158      * builders affect projects that have already been built.
159      * <p>
160      * Users must call <code>IWorkspace.setDescription</code> before changes
161      * made to this description take effect.
162      * </p>
163      *
164      * @param number the maximum number of times that the workspace should rebuild
165      * when builders affect projects that have already been built.
166      * @see IWorkspace#setDescription(IWorkspaceDescription)
167      * @see #getMaxBuildIterations()
168      * @see ResourcesPlugin#PREF_MAX_BUILD_ITERATIONS
169      * @since 2.1
170      */

171     public void setMaxBuildIterations(int number);
172
173     /**
174      * Sets the maximum number of states per file that can be stored in the local history.
175      * If the maximum number is reached, older states are removed in favor of
176      * new ones.
177      * <p>
178      * Users must call <code>IWorkspace.setDescription</code> before changes
179      * made to this description take effect.
180      * </p>
181      *
182      * @param number the maximum number of states per file that can be stored in the local history
183      * @see IWorkspace#setDescription(IWorkspaceDescription)
184      * @see #getMaxFileStates()
185      * @see ResourcesPlugin#PREF_MAX_FILE_STATES
186      */

187     public void setMaxFileStates(int number);
188
189     /**
190      * Sets the maximum permitted size of a file, in bytes, to be stored in the
191      * local history.
192      * <p>
193      * Users must call <code>IWorkspace.setDescription</code> before changes
194      * made to this description take effect.
195      * </p>
196      *
197      * @param size the maximum permitted size of a file to be stored in the local history
198      * @see IWorkspace#setDescription(IWorkspaceDescription)
199      * @see #getMaxFileStateSize()
200      * @see ResourcesPlugin#PREF_MAX_FILE_STATE_SIZE
201      */

202     public void setMaxFileStateSize(long size);
203
204     /**
205      * Sets the interval between automatic workspace snapshots. The new interval
206      * will only take effect after the next snapshot.
207      * <p>
208      * Users must call <code>IWorkspace.setDescription</code> before changes
209      * made to this description take effect.
210      * </p>
211      *
212      * @param delay the amount of time in milliseconds between automatic workspace snapshots
213      * @see IWorkspace#setDescription(IWorkspaceDescription)
214      * @see #getSnapshotInterval()
215      * @see ResourcesPlugin#PREF_SNAPSHOT_INTERVAL
216      * @since 2.0
217      */

218     public void setSnapshotInterval(long delay);
219 }
220
Popular Tags