KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > apt > core > util > IFactoryPath


1 /*******************************************************************************
2  * Copyright (c) 2005, 2007 BEA Systems, Inc.
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  * wharley@bea.com - initial API and implementation
10  *******************************************************************************/

11
12 package org.eclipse.jdt.apt.core.util;
13
14 import java.io.File JavaDoc;
15
16 import org.eclipse.core.runtime.CoreException;
17 import org.eclipse.core.runtime.IPath;
18
19 /**
20  * A minimal API for manipulating the annotation processor factory path.
21  * The factory path is an ordered list of containers, each of which has
22  * certain attributes, e.g., isEnabled, runInBatchMode. Containers on
23  * the path do not necessarily contain implementations of any particular
24  * service; in particular, a path may have both Java 5 and Java 6 annotation
25  * processors, as well as entries that contain supporting classes or
26  * resources.
27  * <p>
28  * Clients should not implement this interface.
29  */

30 public interface IFactoryPath {
31     
32     /**
33      * Add an external jar file (not in the workspace) to the head of the
34      * factory path. If the jar is already on the path, move it to the
35      * head. The jar will be added with default attributes, e.g.,
36      * isEnabled=true, runInBatchMode=false.
37      * @param jar a java.io.File representing the jar file. Must not be null.
38      */

39     public void addExternalJar(File JavaDoc jar);
40     
41     /**
42      * Remove an external jar file from the factory path.
43      * If the jar isn't on the path, do nothing.
44      * @param jar must not be null.
45      */

46     public void removeExternalJar(File JavaDoc jar);
47     
48     /**
49      * Add a jar file in the workspace to the head of the
50      * factory path. If the jar is already on the path, move it to the
51      * head. The jar will be added with default attributes, e.g.,
52      * isEnabled=true, runInBatchMode=false.
53      * @param jarPath an Eclipse IPath representing the jar file; the path is
54      * relative to the workspace root. Must not be null.
55      */

56     public void addWkspJar(IPath jarPath);
57     
58     /**
59      * Remove a workspace-relative jar from the factory path.
60      * If the jar isn't on the path, do nothing.
61      * @param jarPath an Eclipse IPath representing the jar file; the path is
62      * relative to the workspace root. Must not be null.
63      */

64     public void removeWkspJar(IPath jarPath);
65     
66     /**
67      * Add a jar file in the workspace, specified with a classpath variable,
68      * to the head of the factory path. If the jar is already on the path,
69      * move it to the head. The jar will be added with default attributes,
70      * e.g., isEnabled=true, runInBatchMode=false.
71      * @param jarPath an Eclipse IPath representing the jar file; the first
72      * segment of the path is assumed to be the variable name. Must not
73      * be null.
74      */

75     public void addVarJar(IPath jarPath);
76     
77     /**
78      * Remove from the factory path a jar file whose name is based on a
79      * classpath variable. If the jar isn't on the path, do nothing.
80      * @param jarPath an Eclipse IPath representing the jar file; the first
81      * segment of the path is assumed to be the variable name. Must not
82      * be null.
83      */

84     public void removeVarJar(IPath jarPath);
85     
86     /**
87      * Enable a plugin on the factory path, and move it to the head of the
88      * path.
89      * @param pluginId the unique id of the processor plugin, e.g.,
90      * "org.example.myProcessors"
91      * @throws CoreException if the plugin is not installed.
92      */

93     public void enablePlugin(String JavaDoc pluginId) throws CoreException;
94     
95     /**
96      * Disable a plugin on the factory path.
97      * If the plugin is not installed, do nothing.
98      * @param pluginId the unique id of the processor plugin, e.g.,
99      * "org.example.myProcessors"
100      */

101     public void disablePlugin(String JavaDoc pluginId);
102 }
103
Popular Tags