|
1 /******************************************************************************* |
|
2 * Copyright (c) 2000, 2009 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 * |
|
20 * @see IWorkspace#getDescription() |
|
21 * @see IWorkspace#setDescription(IWorkspaceDescription) |
|
22 * @see IWorkspace#newProjectDescription(String) |
|
23 * @noimplement This interface is not intended to be implemented by clients. |
|
24 * @noextend This interface is not intended to be extended by clients. |
|
25 */ |
|
26 public interface IWorkspaceDescription { |
|
27 /** |
|
28 * Returns the order in which projects in the workspace should be built. |
|
29 * The returned value is <code>null</code> if the workspace's default build |
|
30 * order is being used. |
|
31 * |
|
32 * @return the names of projects in the order they will be built, |
|
33 * or <code>null</code> if the default build order should be used |
|
34 * @see #setBuildOrder(String[]) |
|
35 * @see ResourcesPlugin#PREF_BUILD_ORDER |
|
36 */ |
|
37 public String[] getBuildOrder(); |
|
38 |
|
39 /** |
|
40 * Returns the maximum length of time, in milliseconds, a file state should be |
|
41 * kept in the local history. |
|
42 * |
|
43 * @return the maximum time a file state should be kept in the local history |
|
44 * represented in milliseconds |
|
45 * @see #setFileStateLongevity(long) |
|
46 * @see ResourcesPlugin#PREF_FILE_STATE_LONGEVITY |
|
47 */ |
|
48 public long getFileStateLongevity(); |
|
49 |
|
50 /** |
|
51 * Returns the maximum number of times that the workspace should rebuild when |
|
52 * builders affect projects that have already been built. |
|
53 * |
|
54 * @return the maximum number of times that the workspace should rebuild when |
|
55 * builders affect projects that have already been built. |
|
56 * @see #setMaxBuildIterations(int) |
|
57 * @see ResourcesPlugin#PREF_MAX_BUILD_ITERATIONS |
|
58 * @since 2.1 |
|
59 */ |
|
60 public int getMaxBuildIterations(); |
|
61 |
|
62 /** |
|
63 * Returns the maximum number of states per file that can be stored in the local history. |
|
64 * |
|
65 * @return the maximum number of states per file that can be stored in the local history |
|
66 * @see #setMaxFileStates(int) |
|
67 * @see ResourcesPlugin#PREF_MAX_FILE_STATES |
|
68 */ |
|
69 public int getMaxFileStates(); |
|
70 |
|
71 /** |
|
72 * Returns the maximum permitted size of a file, in bytes, to be stored in the |
|
73 * local history. |
|
74 * |
|
75 * @return the maximum permitted size of a file to be stored in the local history |
|
76 * @see #setMaxFileStateSize(long) |
|
77 * @see ResourcesPlugin#PREF_MAX_FILE_STATE_SIZE |
|
78 */ |
|
79 public long getMaxFileStateSize(); |
|
80 |
|
81 /** |
|
82 * Returns the interval between automatic workspace snapshots. |
|
83 * |
|
84 * @return the amount of time in milliseconds between automatic workspace snapshots |
|
85 * @see #setSnapshotInterval(long) |
|
86 * @see ResourcesPlugin#PREF_SNAPSHOT_INTERVAL |
|
87 * @since 2.0 |
|
88 */ |
|
89 public long getSnapshotInterval(); |
|
90 |
|
91 /** |
|
92 * Returns whether this workspace performs autobuilds. |
|
93 * |
|
94 * @return <code>true</code> if autobuilding is on, otherwise |
|
95 * <code>false</code> |
|
96 * @see #setAutoBuilding(boolean) |
|
97 * @see ResourcesPlugin#PREF_AUTO_BUILDING |
|
98 */ |
|
99 public boolean isAutoBuilding(); |
|
100 |
|
101 /** |
|
102 * Records whether this workspace performs autobuilds. |
|
103 * <p> |
|
104 * When autobuild is on, any changes made to a project and its |
|
105 * resources automatically triggers an incremental build of the workspace. |
|
106 * </p> |
|
107 * <p> |
|
108 * Users must call <code>IWorkspace.setDescription</code> before changes |
|
109 * made to this description take effect. |
|
110 * </p> |
|
111 * |
|
112 * @param value <code>true</code> to turn on autobuilding, |
|
113 * and <code>false</code> to turn it off |
|
114 * @see IWorkspace#setDescription(IWorkspaceDescription) |
|
115 * @see #isAutoBuilding() |
|
116 * @see ResourcesPlugin#PREF_AUTO_BUILDING |
|
117 */ |
|
118 public void setAutoBuilding(boolean value); |
|
119 |
|
120 /** |
|
121 * Sets the order in which projects in the workspace should be built. |
|
122 * Projects not named in this list are built in a default order defined |
|
123 * by the workspace. Set this value to <code>null</code> to use the |
|
124 * default ordering for all projects. Projects not named in the list are |
|
125 * built in unspecified order after all ordered projects. |
|
126 * <p> |
|
127 * Users must call <code>IWorkspace.setDescription</code> before changes |
|
128 * made to this description take effect. |
|
129 * </p> |
|
130 * |
|
131 * @param value the names of projects in the order in which they are built, |
|
132 * or <code>null</code> to use the workspace's default order for all projects |
|
133 * @see IWorkspace#setDescription(IWorkspaceDescription) |
|
134 * @see #getBuildOrder() |
|
135 * @see ResourcesPlugin#PREF_BUILD_ORDER |
|
136 */ |
|
137 public void setBuildOrder(String[] value); |
|
138 |
|
139 /** |
|
140 * Sets the maximum time, in milliseconds, a file state should be kept in the |
|
141 * local history. |
|
142 * <p> |
|
143 * Users must call <code>IWorkspace.setDescription</code> before changes |
|
144 * made to this description take effect. |
|
145 * </p> |
|
146 * |
|
147 * @param time the maximum number of milliseconds a file state should be |
|
148 * kept in the local history |
|
149 * @see IWorkspace#setDescription(IWorkspaceDescription) |
|
150 * @see #getFileStateLongevity() |
|
151 * @see ResourcesPlugin#PREF_FILE_STATE_LONGEVITY |
|
152 */ |
|
153 public void setFileStateLongevity(long time); |
|
154 |
|
155 /** |
|
156 * Sets the maximum number of times that the workspace should rebuild when |
|
157 * builders affect projects that have already been built. |
|
158 * <p> |
|
159 * Users must call <code>IWorkspace.setDescription</code> before changes |
|
160 * made to this description take effect. |
|
161 * </p> |
|
162 * |
|
163 * @param number the maximum number of times that the workspace should rebuild |
|
164 * when builders affect projects that have already been built. |
|
165 * @see IWorkspace#setDescription(IWorkspaceDescription) |
|
166 * @see #getMaxBuildIterations() |
|
167 * @see ResourcesPlugin#PREF_MAX_BUILD_ITERATIONS |
|
168 * @since 2.1 |
|
169 */ |
|
170 public void setMaxBuildIterations(int number); |
|
171 |
|
172 /** |
|
173 * Sets the maximum number of states per file that can be stored in the local history. |
|
174 * If the maximum number is reached, older states are removed in favor of |
|
175 * new ones. |
|
176 * <p> |
|
177 * Users must call <code>IWorkspace.setDescription</code> before changes |
|
178 * made to this description take effect. |
|
179 * </p> |
|
180 * |
|
181 * @param number the maximum number of states per file that can be stored in the local history |
|
182 * @see IWorkspace#setDescription(IWorkspaceDescription) |
|
183 * @see #getMaxFileStates() |
|
184 * @see ResourcesPlugin#PREF_MAX_FILE_STATES |
|
185 */ |
|
186 public void setMaxFileStates(int number); |
|
187 |
|
188 /** |
|
189 * Sets the maximum permitted size of a file, in bytes, to be stored in the |
|
190 * local history. |
|
191 * <p> |
|
192 * Users must call <code>IWorkspace.setDescription</code> before changes |
|
193 * made to this description take effect. |
|
194 * </p> |
|
195 * |
|
196 * @param size the maximum permitted size of a file to be stored in the local history |
|
197 * @see IWorkspace#setDescription(IWorkspaceDescription) |
|
198 * @see #getMaxFileStateSize() |
|
199 * @see ResourcesPlugin#PREF_MAX_FILE_STATE_SIZE |
|
200 */ |
|
201 public void setMaxFileStateSize(long size); |
|
202 |
|
203 /** |
|
204 * Sets the interval between automatic workspace snapshots. The new interval |
|
205 * will only take effect after the next snapshot. |
|
206 * <p> |
|
207 * Users must call <code>IWorkspace.setDescription</code> before changes |
|
208 * made to this description take effect. |
|
209 * </p> |
|
210 * |
|
211 * @param delay the amount of time in milliseconds between automatic workspace snapshots |
|
212 * @see IWorkspace#setDescription(IWorkspaceDescription) |
|
213 * @see #getSnapshotInterval() |
|
214 * @see ResourcesPlugin#PREF_SNAPSHOT_INTERVAL |
|
215 * @since 2.0 |
|
216 */ |
|
217 public void setSnapshotInterval(long delay); |
|
218 } |