use of org.eclipse.jdt.ls.core.internal.JavaClientConnection in project eclipse.jdt.ls by eclipse.
the class MavenClasspathTest method setup.
@Before
public void setup() throws Exception {
sharedASTProvider = CoreASTProvider.getInstance();
sharedASTProvider.disposeAST();
// sharedASTProvider.clearASTCreationCount();
javaClient = new JavaClientConnection(client);
lifeCycleHandler = new DocumentLifeCycleHandler(javaClient, preferenceManager, projectsManager, false);
}
use of org.eclipse.jdt.ls.core.internal.JavaClientConnection in project eclipse.jdt.ls by eclipse.
the class DiagnosticHandlerTest method setup.
@Before
public void setup() throws Exception {
CoreASTProvider sharedASTProvider = CoreASTProvider.getInstance();
sharedASTProvider.disposeAST();
// sharedASTProvider.clearASTCreationCount();
javaClient = new JavaClientConnection(client);
}
use of org.eclipse.jdt.ls.core.internal.JavaClientConnection in project eclipse.jdt.ls by eclipse.
the class ShowAllQuickFixTest method setup.
@Before
public void setup() throws Exception {
javaClient = new JavaClientConnection(client);
mockJDTLanguageServer();
JavaLanguageServerPlugin.getInstance().getProtocol().connectClient(client);
fJProject1 = newEmptyProject();
Hashtable<String, String> options = TestOptions.getDefaultOptions();
options.put(JavaCore.COMPILER_PB_UNUSED_PRIVATE_MEMBER, JavaCore.ERROR);
options.put(JavaCore.COMPILER_PB_DEAD_CODE, JavaCore.WARNING);
fJProject1.setOptions(options);
fSourceFolder = fJProject1.getPackageFragmentRoot(fJProject1.getProject().getFolder("src"));
preferenceManager.getPreferences().setJavaQuickFixShowAt("problem");
}
use of org.eclipse.jdt.ls.core.internal.JavaClientConnection in project eclipse.jdt.ls by eclipse.
the class EclipseProjectImporterTest method ignoreMissingResourceFilters.
@Test
public void ignoreMissingResourceFilters() throws Exception {
JavaClientConnection javaClient = new JavaClientConnection(client);
try {
String name = "ignored-filter";
importProjects("eclipse/" + name);
IProject project = getProject(name);
assertIsJavaProject(project);
assertNoErrors(project);
// 1 message sent to the platform logger
assertEquals(logListener.getErrors().toString(), 1, logListener.getErrors().size());
String error = logListener.getErrors().get(0);
assertTrue("Unexpected error: " + error, error.startsWith("Missing resource filter type: 'org.eclipse.ui.ide.missingFilter'"));
// but no message sent to the client
List<Object> loggedMessages = clientRequests.get("logMessage");
assertNull("Unexpected logs " + loggedMessages, loggedMessages);
} finally {
javaClient.disconnect();
}
}
use of org.eclipse.jdt.ls.core.internal.JavaClientConnection in project eclipse.jdt.ls by eclipse.
the class InvisibleProjectPreferenceChangeListenerTest method setup.
@Before
public void setup() throws Exception {
javaClient = new JavaClientConnection(client);
lifeCycleHandler = new DocumentLifeCycleHandler(javaClient, preferenceManager, projectsManager, false);
mockJDTLanguageServer();
}
Aggregations