Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 120658 Details for
Bug 258402
Need better API to check if project is faceted
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
isFaceted method
isFaceted.patch (text/plain), 1.90 KB, created by
kiril mitov
on 2008-12-17 02:01:05 EST
(
hide
)
Description:
isFaceted method
Filename:
MIME Type:
Creator:
kiril mitov
Created:
2008-12-17 02:01:05 EST
Size:
1.90 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.wst.common.project.facet.core >Index: src/org/eclipse/wst/common/project/facet/core/FacetedProjectFramework.java >=================================================================== >RCS file: /cvsroot/webtools/common/plugins/org.eclipse.wst.common.project.facet.core/src/org/eclipse/wst/common/project/facet/core/FacetedProjectFramework.java,v >retrieving revision 1.11 >diff -u -r1.11 FacetedProjectFramework.java >--- src/org/eclipse/wst/common/project/facet/core/FacetedProjectFramework.java 12 Nov 2008 22:42:57 -0000 1.11 >+++ src/org/eclipse/wst/common/project/facet/core/FacetedProjectFramework.java 17 Dec 2008 06:58:06 -0000 >@@ -154,6 +154,35 @@ > } > > /** >+ * <p> >+ * Determines whether the specified project is faceted. Returns >+ * <code>false</code> if the project is not accessible or the project is not >+ * faceted. >+ * </p> >+ * >+ * <p> >+ * This method is explicitly designed to avoid activation of the Faceted >+ * Project Framework if the project is not faceted. >+ * </p> >+ * >+ * @param project >+ * the project to check for the facet presence >+ * @throws CoreException >+ * if failed while reading faceted project metadata >+ */ >+ >+ public static boolean isFaceted(final IProject project) throws CoreException { >+ if (project.isAccessible() && project.isNatureEnabled(FacetedProjectNature.NATURE_ID)) { >+ initialize(); >+ final IFacetedProject fproj = ProjectFacetsManager.create(project); >+ if (fproj != null) { >+ return true; >+ } >+ } >+ return false; >+ } >+ >+ /** > * Adds a faceted project listener that will be notified when the selected events in the faceted > * project life cycle occur. The listener will apply to all faceted projects that exist in the > * workspace now and in the future (until the listener is removed or the workspace is closed).
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 258402
: 120658