Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 258402
Collapse All | Expand All

(-)src/org/eclipse/wst/common/project/facet/core/FacetedProjectFramework.java (+29 lines)
Lines 154-159 Link Here
154
    }
154
    }
155
    
155
    
156
    /**
156
    /**
157
	 * <p>
158
	 * Determines whether the specified project is faceted. Returns
159
	 * <code>false</code> if the project is not accessible or the project is not
160
	 * faceted.
161
	 * </p>
162
	 * 
163
	 * <p>
164
	 * This method is explicitly designed to avoid activation of the Faceted
165
	 * Project Framework if the project is not faceted.
166
	 * </p>
167
	 * 
168
	 * @param project
169
	 *            the project to check for the facet presence
170
	 * @throws CoreException
171
	 *             if failed while reading faceted project metadata
172
	 */
173
    
174
    public static boolean isFaceted(final IProject project) throws CoreException {
175
		if (project.isAccessible() && project.isNatureEnabled(FacetedProjectNature.NATURE_ID)) {
176
			initialize();
177
			final IFacetedProject fproj = ProjectFacetsManager.create(project);
178
			if (fproj != null) {
179
				return true;
180
			}
181
		}
182
		return false;
183
	}
184
    
185
    /**
157
     * Adds a faceted project listener that will be notified when the selected events in the faceted
186
     * Adds a faceted project listener that will be notified when the selected events in the faceted
158
     * project life cycle occur. The listener will apply to all faceted projects that exist in the
187
     * project life cycle occur. The listener will apply to all faceted projects that exist in the
159
     * workspace now and in the future (until the listener is removed or the workspace is closed).
188
     * workspace now and in the future (until the listener is removed or the workspace is closed).

Return to bug 258402