ide

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertPatchDir

func ConvertPatchDir(copySet set.Set, javaProject *JavaProject, patchOutPath string) error

ConvertPatchDir 复制源文件到指定位置

Types

type Classes

type Classes struct {
	Root Root `xml:"root"`
}

type ClasspathEntry

type ClasspathEntry struct {
	Kind string `xml:"kind,attr"`
	Path string `xml:"path,attr"`
}

type Component

type Component struct {
	Name          string       `xml:"name,attr"`
	LanguageLevel string       `xml:"LANGUAGE_LEVEL,attr"`
	Facets        []Facet      `xml:"facet"`
	Output        Output       `xml:"output"`
	TestOutput    Output       `xml:"output-test"`
	Content       Content      `xml:"content"`
	OrderEntries  []OrderEntry `xml:"orderEntry"`
}

type Configuration

type Configuration struct {
	Descriptors Descriptors `xml:"descriptors"`
	WebRoots    WebRoots    `xml:"webroots"`
	SourceRoots SourceRoots `xml:"sourceRoots"`
}

type Content

type Content struct {
	Url            string         `xml:"url,attr"`
	SourceFolders  []SourceFolder `xml:"sourceFolder"`
	ExcludeFolders []SourceFolder `xml:"excludeFolders"`
}

type DependentModule

type DependentModule struct {
	ArchiveName    string `xml:"archiveName,attr"`
	DeployPath     string `xml:"deploy-path,attr"`
	Handle         string `xml:"handle,attr"`
	DependencyType string `xml:"dependency-type"`
}

type DeploymentDescriptor

type DeploymentDescriptor struct {
	Name string `xml:"name,attr"`
	Url  string `xml:"url,attr"`
}

type Descriptors

type Descriptors struct {
	DeploymentDescriptors []DeploymentDescriptor `xml:"deploymentDescriptor"`
}

type EclipseNormalProjectConfig

type EclipseNormalProjectConfig struct {
	Classpath        xml.Name         `xml:"classpath"`
	ClasspathEntries []ClasspathEntry `xml:"classpathentry"`
}

普通eclipse配置 对应.classpath文件

type EclipseProject

type EclipseProject struct {
	JavaProject
}

func (*EclipseProject) AnalysisProjectConfig

func (e *EclipseProject) AnalysisProjectConfig() (*JavaProject, error)

type EclipseWebProjectConfig

type EclipseWebProjectConfig struct {
	ProjectModuleId string    `xml:"id,attr"`
	ProjectVersion  string    `xml:"project-version,attr"`
	WebModule       WebModule `xml:"wb-module"`
}

eclipse Web配置 对应.settings/org.eclipse.wst.common.component文件

type Facet

type Facet struct {
	Name          string        `xml:"name,attr"`
	Type          string        `xml:"type,attr"`
	Configuration Configuration `xml:"configuration"`
}

type IDE

type IDE interface {
	// AnalysisProjectConfig 解析项目配置
	AnalysisProjectConfig() (*JavaProject, error)
}

func GetInstance

func GetInstance(typeName, projectConfigPath string) IDE

type IdeaProject

type IdeaProject struct {
	JavaProject
	ProjectConfigPath string
}

func (*IdeaProject) AnalysisProjectConfig

func (idea *IdeaProject) AnalysisProjectConfig() (*JavaProject, error)

type IdeaProjectConfig

type IdeaProjectConfig struct {
	Module     xml.Name    `xml:"module"`
	Type       string      `xml:"type,attr"`
	Version    string      `xml:"version,attr"`
	Components []Component `xml:"component"`
}

idea配置 对应后缀为iml的文件

type JarDirectory

type JarDirectory struct {
	Url       string `xml:"url,attr"`
	Recursive string `xml:"recursive,attr"`
	Type      string `xml:"type,attr"`
}

type JavaProject

type JavaProject struct {
	ProjectPath    string   //项目根路径
	JavaSrcPaths   []string //src源文件根路径
	WebRootPaths   []string //WebRoot路径
	ClassesOutPath string   //class文件路径
}

type Library

type Library struct {
	Name           string         `xml:"name,attr"`
	Classes        Classes        `xml:"CLASSES"`
	Javadoc        string         `xml:"JAVADOC"`
	Sources        string         `xml:"SOURCES"`
	JarDirectories []JarDirectory `xml:"jarDirectory"`
}

type OrderEntry

type OrderEntry struct {
	Type       string  `xml:"type,attr"`
	Name       string  `xml:"name,attr"`
	Level      string  `xml:"level,attr"`
	Scope      string  `xml:"scope,attr"`
	ForTests   string  `xml:"forTests,attr"`
	ModuleName string  `xml:"module-name,attr"`
	Library    Library `xml:"library"`
	JdkName    string  `xml:"jdkName,attr"`
	JdkType    string  `xml:"jdkType,attr"`
}

type Output

type Output struct {
	Url string `xml:"url,attr"`
}

type Property

type Property struct {
	Name  string `xml:"name,attr"`
	Value string `xml:"value,attr"`
}

type Root

type Root struct {
	Url      string `xml:"url,attr"`
	Relative string `xml:"relative,attr"`
}

type SourceFolder

type SourceFolder struct {
	Url          string `xml:"url,attr"`
	Type         string `xml:"type,attr"`
	IsTestSource string `xml:"isTestSource,attr"`
}

type SourceRoots

type SourceRoots struct {
	Roots []Root `xml:"root"`
}

type WebModule

type WebModule struct {
	DeployName       string            `xml:"deploy-name,attr"`
	WebResources     []WebResource     `xml:"wb-resource"`
	DependentModules []DependentModule `xml:"dependent-module"`
	Properties       []Property        `xml:"property"`
}

type WebResource

type WebResource struct {
	DeployPath string `xml:"deploy-path,attr"`
	SourcePath string `xml:"source-path,attr"`
	Tag        string `xml:"tag,attr"`
}

type WebRoots

type WebRoots struct {
	Roots []Root `xml:"root"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL