当前位置: 首页>>代码示例>>Java>>正文


Java ConfigException类代码示例

本文整理汇总了Java中org.aikodi.chameleon.workspace.ConfigException的典型用法代码示例。如果您正苦于以下问题:Java ConfigException类的具体用法?Java ConfigException怎么用?Java ConfigException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ConfigException类属于org.aikodi.chameleon.workspace包,在下文中一共展示了ConfigException类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: CommandLineTool

import org.aikodi.chameleon.workspace.ConfigException; //导入依赖的package包/类
public CommandLineTool(String[] args) throws ConfigException {
   if(args.length < 2) {
     System.out.println("Usage: java packageName.ToolName "+"xmlConfigFile @recursivePackageFQN* #packageFQN* $typeFQN*");
   }
   Config.setCaching(true);
   LanguageRepository repo = new LanguageRepository();
	Workspace workspace = new Workspace(repo);
   repo.add(new Java7LanguageFactory().create());
	_provider = new ModelBuilder(args, workspace);
   
  _project = _provider.project();
}
 
开发者ID:markovandooren,项目名称:jnome,代码行数:13,代码来源:CommandLineTool.java

示例2: binaryNonBaseScannerAdded

import org.aikodi.chameleon.workspace.ConfigException; //导入依赖的package包/类
@Override
protected void binaryNonBaseScannerAdded(DocumentScanner loader) throws ConfigException {
	if(loader instanceof BaseJavaProjectLoader) {
		return;
	}
	if(loader instanceof JarScanner) {
		BinaryPath p = createOrGetChild(BinaryPath.class);
		p.createOrUpdateChild(BinaryPath.Jar.class,loader);
	} else {
		super.binaryScannerAdded(loader);
	}
}
 
开发者ID:markovandooren,项目名称:jnome,代码行数:13,代码来源:JavaProjectConfiguration.java

示例3: pathChanged

import org.aikodi.chameleon.workspace.ConfigException; //导入依赖的package包/类
protected void pathChanged() throws ConfigException {
	try {
		JarFile path = new JarFile(project().absoluteFile(path()));
	view().addBinary(new JarScanner(path, language(Java7.NAME).plugin(ProjectConfigurator.class).binaryFileFilter()));
	} catch (ProjectException | IOException e) {
		throw new ConfigException(e);
	}
}
 
开发者ID:markovandooren,项目名称:jnome,代码行数:9,代码来源:JavaProjectConfiguration.java

示例4: addBaseScanner

import org.aikodi.chameleon.workspace.ConfigException; //导入依赖的package包/类
@Override
protected void addBaseScanner(View view) {
	try {
		//Add the base loader.
		// FIXME The loader waits until it is added and then creates the predefined elements
		// This does not work with the IBM VM, which splits the base jar in two parts.
		// Object and Integer are in separate jar files, so Integer isn't loaded right now.
		view.addBinary(new BaseJavaProjectLoader(baseJarPath(),(Java7)language()));
	} catch (ProjectException e) {
		throw new ConfigException(e);
	}
}
 
开发者ID:markovandooren,项目名称:jnome,代码行数:13,代码来源:JavaProjectConfigurator.java

示例5: Java7LanguageFactory

import org.aikodi.chameleon.workspace.ConfigException; //导入依赖的package包/类
@Override
protected void $after() throws ConfigException {
	Java7 java = new Java7LanguageFactory().create();
	_project = new Project(_name, _root, new JavaView(new LazyRootNamespace(), java));
	try {
		new JavaEclipseClasspathConfig(_project,_containerConfiguration,_environment);
	} catch (ProjectException e) {
		throw new ConfigException(e);
	}
}
 
开发者ID:markovandooren,项目名称:jnome,代码行数:11,代码来源:JavaEclipseProjectConfig.java

示例6: if

import org.aikodi.chameleon.workspace.ConfigException; //导入依赖的package包/类
@Override
		protected void $after() throws ConfigException {
			try {
				if(_kind.equals("src")) {
					loadSrc(finalPath());
				} else if(_kind.equals("lib") || _kind.equals("var")) {
					loadBin(finalPath());
				} else if(_kind.equals("con")) {
					if(finalPath() == null) {
						throw new IllegalStateException("The container has not path attribute.");
					}
					if(! finalPath().startsWith("org.eclipse.jdt.launching.JRE_CONTAINER")) {
						String path = _loaders.get(finalPath());
//						if(path == null) {
//							throw new IllegalStateException("No container with key "+_path+" is registered.");
//						}
						if(path != null) {
						  loadBin(path);
						}
					}
				} else if(_kind.equals("output")) {
					//FIXME Do we need to support the output option? It is tool dependeny, but since
					// this configuration is for Eclipse, we should set the corresponding (currently
					// non-existing) option for the (non-existing) compiler.
				} else {
					throw new IllegalStateException("Unknown classpath entry kind: "+_kind);
				}
			} catch (ProjectException e) {
				throw new ConfigException(e);
			}
		}
 
开发者ID:markovandooren,项目名称:jnome,代码行数:32,代码来源:JavaEclipseClasspathConfig.java

示例7: makeProject

import org.aikodi.chameleon.workspace.ConfigException; //导入依赖的package包/类
protected final Project makeProject() throws ConfigException {
	Project project;
	LanguageRepository repo = new LanguageRepository();
	Workspace workspace = new Workspace(repo);
	Java7 java = new Java7LanguageFactory().create();
	repo.add(java);
	java.setPlugin(ProjectConfigurator.class, new JavaProjectConfigurator(Java7LanguageFactory.javaBaseJar()));
	XMLProjectLoader config = new XMLProjectLoader(workspace);
	project = config.project(projectFile(),null);
	return project;
}
 
开发者ID:markovandooren,项目名称:jnome,代码行数:12,代码来源:JavaTest.java

示例8: javaBaseJar

import org.aikodi.chameleon.workspace.ConfigException; //导入依赖的package包/类
/**
 * <p>Determine the jar file that contains the base classes from the
 * JVM that runs this code.</p>
 * 
 * @return the jar file that contains the base classes from the
  * JVM that runs this code.
  * 
 * @throws ConfigException The jar file could not be found.
 */
public static JarFile javaBaseJar() throws ConfigException {
	try {
		URL url = Object.class.getResource("/java/lang/Object.class");
		String path = URLDecoder.decode(url.getFile(),"UTF-8");
		path = path.substring(5, path.indexOf('!'));
		JarFile jarFile = new JarFile(path);
		return jarFile;
	} catch (IOException e) {
		throw new ConfigException(e);
	}
}
 
开发者ID:markovandooren,项目名称:jnome,代码行数:21,代码来源:Java7LanguageFactory.java

示例9: addBaseScanner

import org.aikodi.chameleon.workspace.ConfigException; //导入依赖的package包/类
@Override
protected void addBaseScanner(View view) {
	// The base loader for Java already creates the primitive types
	// and load the Java base library.
	// Therefore, we only have to add a loader for the base JLo library file.

	// 1) For a normal jar release, the base library is always stored inside jlo.jar
	// 2) For the Eclipse plugin, the base library is included inside the plugin jar
	//    and the jlo-base.jar is included as well.
	// 3) When the Eclipse plugin is run as a nested Eclipse during development, 
	//    we use a Directory loader to read the sources directly.
	URL url = getClass().getProtectionDomain().getCodeSource().getLocation();
	try {
		String path = URLDecoder.decode(url.getFile(),"UTF-8");
		SafePredicate<? super String> sourceFileFilter = sourceFileFilter();
		if(path.endsWith(".jar")) {
			JarFile jarFile = new JarFile(path);
			view.addBinary(new ZipScanner(jarFile, sourceFileFilter));
		} else {
			File root = new File(url.toURI());
			if(_baseLibraryInParent) {
				root = root.getParentFile();
			}
			File file = new File(root,JLO_BASE_LIBRARY_DIRECTORY);
			view.addBinary(new BaseDirectoryLoader(file.getAbsolutePath(), new LazyJavaFileInputSourceFactory(), sourceFileFilter));
		}
	} catch (Exception e) {
		throw new ConfigException(e);
	}
}
 
开发者ID:markovandooren,项目名称:jlo,代码行数:31,代码来源:JLoProjectConfigurator.java

示例10: DesignAnalyzer

import org.aikodi.chameleon.workspace.ConfigException; //导入依赖的package包/类
public DesignAnalyzer(Project project) throws ConfigException {
	super(project);
}
 
开发者ID:markovandooren,项目名称:jnome,代码行数:4,代码来源:DesignAnalyzer.java

示例11: JavaProjectConfiguration

import org.aikodi.chameleon.workspace.ConfigException; //导入依赖的package包/类
public JavaProjectConfiguration(View view, FileDocumentLoaderFactory inputSourceFactory) throws ConfigException {
	super(view, inputSourceFactory);
}
 
开发者ID:markovandooren,项目名称:jnome,代码行数:4,代码来源:JavaProjectConfiguration.java

示例12: createProjectConfig

import org.aikodi.chameleon.workspace.ConfigException; //导入依赖的package包/类
@Override
protected ProjectConfiguration createProjectConfig(View view) throws ConfigException {
	return new JavaProjectConfiguration(view, new LazyJavaFileInputSourceFactory());
}
 
开发者ID:markovandooren,项目名称:jnome,代码行数:5,代码来源:JavaProjectConfigurator.java

示例13:

import org.aikodi.chameleon.workspace.ConfigException; //导入依赖的package包/类
@Override
public void $setText(String text) throws ConfigException {
	_name = text;
}
 
开发者ID:markovandooren,项目名称:jnome,代码行数:5,代码来源:JavaEclipseProjectConfig.java

示例14: testTypeReferences

import org.aikodi.chameleon.workspace.ConfigException; //导入依赖的package包/类
@Test
public void testTypeReferences() throws LookupException, ProjectException, ConfigException {
	GenericTypeReferenceTest customGenericsTest = new GenericTypeReferenceTest(project());
	customGenericsTest.testSubtyping();
	customGenericsTest.testWildcards();
}
 
开发者ID:markovandooren,项目名称:jnome,代码行数:7,代码来源:TestCustomCases.java

示例15: testGenerics

import org.aikodi.chameleon.workspace.ConfigException; //导入依赖的package包/类
@Test
public void testGenerics() throws ConfigException, LookupException, ProjectException {
	new CustomGenericsTest(project()).testExceptions();
}
 
开发者ID:markovandooren,项目名称:jnome,代码行数:5,代码来源:TestExceptions.java


注:本文中的org.aikodi.chameleon.workspace.ConfigException类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。