Java Code Examples for org.eclipse.ui.preferences.ScopedPreferenceStore#putValue()

The following examples show how to use org.eclipse.ui.preferences.ScopedPreferenceStore#putValue() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TestTypeScript.java    From wildwebdeveloper with Eclipse Public License 2.0 6 votes vote down vote up
@Before
public void setUpProject() throws Exception {
	ScopedPreferenceStore prefs = new ScopedPreferenceStore(InstanceScope.INSTANCE, "org.eclipse.lsp4e");
	prefs.putValue("org.eclipse.wildwebdeveloper.angular.file.logging.enabled", Boolean.toString(true));
	prefs.putValue("org.eclipse.wildwebdeveloper.jsts.file.logging.enabled", Boolean.toString(true));
	prefs.putValue("org.eclipse.wildwebdeveloper.css.file.logging.enabled", Boolean.toString(true));
	prefs.putValue("org.eclipse.wildwebdeveloper.html.file.logging.enabled", Boolean.toString(true));
	prefs.putValue("org.eclipse.wildwebdeveloper.json.file.logging.enabled", Boolean.toString(true));
	prefs.putValue("org.eclipse.wildwebdeveloper.xml.file.logging.enabled", Boolean.toString(true));
	prefs.putValue("org.eclipse.wildwebdeveloper.yaml.file.logging.enabled", Boolean.toString(true));
	this.project = ResourcesPlugin.getWorkspace().getRoot().getProject(getClass().getName() + System.nanoTime());
	project.create(null);
	project.open(null);
	IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
	for (IViewReference ref : activePage.getViewReferences()) {
		activePage.hideView(ref);
	}
}
 
Example 2
Source File: TestLanguageServers.java    From wildwebdeveloper with Eclipse Public License 2.0 6 votes vote down vote up
@Before
public void setUpProject() throws Exception {
	ScopedPreferenceStore prefs = new ScopedPreferenceStore(InstanceScope.INSTANCE, "org.eclipse.lsp4e");
	prefs.putValue("org.eclipse.wildwebdeveloper.angular.file.logging.enabled", Boolean.toString(true));
	prefs.putValue("org.eclipse.wildwebdeveloper.jsts.file.logging.enabled", Boolean.toString(true));
	prefs.putValue("org.eclipse.wildwebdeveloper.css.file.logging.enabled", Boolean.toString(true));
	prefs.putValue("org.eclipse.wildwebdeveloper.html.file.logging.enabled", Boolean.toString(true));
	prefs.putValue("org.eclipse.wildwebdeveloper.json.file.logging.enabled", Boolean.toString(true));
	prefs.putValue("org.eclipse.wildwebdeveloper.xml.file.logging.enabled", Boolean.toString(true));
	prefs.putValue("org.eclipse.wildwebdeveloper.yaml.file.logging.enabled", Boolean.toString(true));
	this.project = ResourcesPlugin.getWorkspace().getRoot().getProject(getClass().getName() + System.nanoTime());
	project.create(null);
	project.open(null);
	IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
	for (IViewReference ref : activePage.getViewReferences()) {
		activePage.hideView(ref);
	}
}
 
Example 3
Source File: AllCleanRule.java    From wildwebdeveloper with Eclipse Public License 2.0 6 votes vote down vote up
@Override
protected void starting(Description description) {
	super.starting(description);
	IIntroPart intro = PlatformUI.getWorkbench().getIntroManager().getIntro();
	if (intro != null) {
		PlatformUI.getWorkbench().getIntroManager().closeIntro(intro);
	}
	IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
	for (IViewReference ref : activePage.getViewReferences()) {
		activePage.hideView(ref);
	}
	ScopedPreferenceStore prefs = new ScopedPreferenceStore(InstanceScope.INSTANCE, "org.eclipse.lsp4e");
	prefs.putValue("org.eclipse.wildwebdeveloper.angular.file.logging.enabled", Boolean.toString(true));
	prefs.putValue("org.eclipse.wildwebdeveloper.jsts.file.logging.enabled", Boolean.toString(true));
	prefs.putValue("org.eclipse.wildwebdeveloper.css.file.logging.enabled", Boolean.toString(true));
	prefs.putValue("org.eclipse.wildwebdeveloper.html.file.logging.enabled", Boolean.toString(true));
	prefs.putValue("org.eclipse.wildwebdeveloper.json.file.logging.enabled", Boolean.toString(true));
	prefs.putValue("org.eclipse.wildwebdeveloper.xml.file.logging.enabled", Boolean.toString(true));
	prefs.putValue("org.eclipse.wildwebdeveloper.yaml.file.logging.enabled", Boolean.toString(true));
	clearProjects();
}
 
Example 4
Source File: TestESLint.java    From wildwebdeveloper with Eclipse Public License 2.0 5 votes vote down vote up
@Before
public void setUpProject() throws Exception {
	ScopedPreferenceStore prefs = new ScopedPreferenceStore(InstanceScope.INSTANCE, "org.eclipse.lsp4e");
	prefs.putValue("org.eclipse.wildwebdeveloper.angular.file.logging.enabled", Boolean.toString(true));
	prefs.putValue("org.eclipse.wildwebdeveloper.jsts.file.logging.enabled", Boolean.toString(true));
	prefs.putValue("org.eclipse.wildwebdeveloper.css.file.logging.enabled", Boolean.toString(true));
	prefs.putValue("org.eclipse.wildwebdeveloper.html.file.logging.enabled", Boolean.toString(true));
	prefs.putValue("org.eclipse.wildwebdeveloper.json.file.logging.enabled", Boolean.toString(true));
	prefs.putValue("org.eclipse.wildwebdeveloper.xml.file.logging.enabled", Boolean.toString(true));
	prefs.putValue("org.eclipse.wildwebdeveloper.yaml.file.logging.enabled", Boolean.toString(true));
	this.project = ResourcesPlugin.getWorkspace().getRoot().getProject(getClass().getName() + System.nanoTime());
	project.create(null);
	project.open(null);

	// Setup ESLint configuration and dependencies
	IFile eslintConfig = project.getFile(".eslintrc");
	eslintConfig.create(getClass().getResourceAsStream("/testProjects/eslint/.eslintrc"), true, null);
	IFile tsConfig = project.getFile("tsconfig.json");
	tsConfig.create(getClass().getResourceAsStream("/testProjects/eslint/tsconfig.json"), true, null);
	IFile packageJson = project.getFile("package.json");
	packageJson.create(getClass().getResourceAsStream("/testProjects/eslint/package.json"), true, null);
	Process dependencyInstaller = new ProcessBuilder(TestAngular.getNpmLocation(), "install")
			.directory(project.getLocation().toFile()).start();
	assertEquals("npm install didn't complete properly", 0, dependencyInstaller.waitFor());

	IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
	for (IViewReference ref : activePage.getViewReferences()) {
		activePage.hideView(ref);
	}
}