KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > core > internal > properties > TestingSupport


1 /*******************************************************************************
2  * Copyright (c) 2000, 2004 IBM Corporation 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  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.core.internal.properties;
12
13 import org.eclipse.core.internal.resources.Resource;
14 import org.eclipse.core.resources.IResource;
15 import org.eclipse.core.runtime.CoreException;
16
17 /**
18  * Provides special internal access to the property store implementation.
19  * This class is to be used for testing purposes only.
20  *
21  * @since 2.1
22  */

23 public class TestingSupport {
24
25     /**
26      * Return the property store which is associated with the given resource.
27      *
28      * @param resource the resource whose property store is being accessed
29      * @return the resource's property store
30      * @throws CoreException if there was a problem accessing the resource's property store
31      * @since 2.1
32      */

33     public static PropertyStore getPropertyStore(IResource resource) throws CoreException {
34         return ((Resource) resource).getPropertyManager().getPropertyStore(resource);
35     }
36
37 }
Popular Tags