public enum PomTemplateContext extends Enum<PomTemplateContext>
Enum Constant and Description |
---|
ARTIFACT_ID |
BUILD |
CLASSIFIER |
CONFIGURATION |
DEPENDENCIES |
DEPENDENCY_MANAGEMENT |
DOCUMENT |
EXCLUSIONS |
EXECUTIONS |
GOAL |
GROUP_ID |
LICENSES |
MODULE |
MODULES |
PACKAGING |
PARENT |
PHASE |
PLUGIN |
PLUGIN_MANAGEMENT |
PLUGINS |
PROFILE |
PROFILES |
PROJECT |
PROPERTIES |
RELATIVE_PATH |
REPOSITORIES |
SCOPE |
SYSTEM_PATH |
TYPE |
UNKNOWN |
VERSION |
Modifier and Type | Method and Description |
---|---|
protected void |
addTemplates(org.apache.maven.project.MavenProject project,
org.eclipse.core.resources.IProject eclipsePrj,
Collection<org.eclipse.jface.text.templates.Template> templates,
Node currentNode,
String prefix) |
static PomTemplateContext |
fromId(String contextTypeId) |
static PomTemplateContext |
fromNodeName(String idSuffix) |
protected static String |
getArtifactId(Node currentNode) |
protected ArtifactInfo |
getContainingArtifact(Node currentNode)
Returns containing artifactInfo for exclusions.
|
String |
getContextTypeId() |
protected String |
getGroupId(Node currentNode) |
protected String |
getNodeName() |
protected Packaging |
getPackaging(Node currentNode)
Returns required packaging.
|
org.eclipse.jface.text.templates.Template[] |
getTemplates(org.apache.maven.project.MavenProject project,
org.eclipse.core.resources.IProject eclipsePrj,
Node node,
String prefix)
Return templates depending on the context type.
|
protected static String |
getVersion(Node currentNode) |
static void |
setSearchEngineForTests(SearchEngine _searchEngineForTests) |
static PomTemplateContext |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static PomTemplateContext[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PomTemplateContext UNKNOWN
public static final PomTemplateContext DOCUMENT
public static final PomTemplateContext PROJECT
public static final PomTemplateContext BUILD
public static final PomTemplateContext PARENT
public static final PomTemplateContext RELATIVE_PATH
public static final PomTemplateContext MODULES
public static final PomTemplateContext PROPERTIES
public static final PomTemplateContext DEPENDENCIES
public static final PomTemplateContext DEPENDENCY_MANAGEMENT
public static final PomTemplateContext EXCLUSIONS
public static final PomTemplateContext PLUGINS
public static final PomTemplateContext PLUGIN
public static final PomTemplateContext PLUGIN_MANAGEMENT
public static final PomTemplateContext EXECUTIONS
public static final PomTemplateContext PROFILES
public static final PomTemplateContext PROFILE
public static final PomTemplateContext REPOSITORIES
public static final PomTemplateContext CONFIGURATION
public static final PomTemplateContext GROUP_ID
public static final PomTemplateContext ARTIFACT_ID
public static final PomTemplateContext VERSION
public static final PomTemplateContext CLASSIFIER
public static final PomTemplateContext TYPE
public static final PomTemplateContext PACKAGING
public static final PomTemplateContext SCOPE
public static final PomTemplateContext SYSTEM_PATH
public static final PomTemplateContext PHASE
public static final PomTemplateContext GOAL
public static final PomTemplateContext MODULE
public static final PomTemplateContext LICENSES
public static PomTemplateContext[] values()
for (PomTemplateContext c : PomTemplateContext.values()) System.out.println(c);
public static PomTemplateContext valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic org.eclipse.jface.text.templates.Template[] getTemplates(org.apache.maven.project.MavenProject project, org.eclipse.core.resources.IProject eclipsePrj, Node node, String prefix)
protected void addTemplates(org.apache.maven.project.MavenProject project, org.eclipse.core.resources.IProject eclipsePrj, Collection<org.eclipse.jface.text.templates.Template> templates, Node currentNode, String prefix) throws org.eclipse.core.runtime.CoreException
project
- eclipsePrj
- only here because getSearchEngine() requires it as parameter.templates
- currentNode
- prefix
- org.eclipse.core.runtime.CoreException
protected String getNodeName()
public String getContextTypeId()
public static PomTemplateContext fromId(String contextTypeId)
public static PomTemplateContext fromNodeName(String idSuffix)
public static void setSearchEngineForTests(SearchEngine _searchEngineForTests)
protected ArtifactInfo getContainingArtifact(Node currentNode)
Copyright © 2005–2015 Sonatype, Inc.. All rights reserved.