當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。