Search in sources :

Example 1 with JavaClientConnection

use of org.eclipse.jdt.ls.core.internal.JavaClientConnection in project eclipse.jdt.ls by eclipse.

the class DiagnosticsCommandTest method setup.

@Before
public void setup() throws Exception {
    mockPreferences();
    javaClient = new JavaClientConnection(client);
    lifeCycleHandler = new DocumentLifeCycleHandler(javaClient, preferenceManager, projectsManager, false);
    mockJDTLanguageServer();
    originalGlobalErrorLevel = JavaLanguageServerPlugin.getNonProjectDiagnosticsState().getGlobalErrorLevel();
    JavaLanguageServerPlugin.getNonProjectDiagnosticsState().setGlobalErrorLevel(ErrorLevel.SYNTAX_ERROR);
}
Also used : DocumentLifeCycleHandler(org.eclipse.jdt.ls.core.internal.handlers.DocumentLifeCycleHandler) JavaClientConnection(org.eclipse.jdt.ls.core.internal.JavaClientConnection) Before(org.junit.Before)

Example 2 with JavaClientConnection

use of org.eclipse.jdt.ls.core.internal.JavaClientConnection in project eclipse.jdt.ls by eclipse.

the class WorkspaceEventHandlerTest method setup.

@Before
public void setup() throws Exception {
    sharedASTProvider = CoreASTProvider.getInstance();
    sharedASTProvider.disposeAST();
    javaClient = new JavaClientConnection(client);
    lifeCycleHandler = new DocumentLifeCycleHandler(javaClient, preferenceManager, projectsManager, false);
    handler = new WorkspaceDiagnosticsHandler(javaClient, projectsManager, preferenceManager.getClientPreferences());
    handler.addResourceChangeListener();
}
Also used : JavaClientConnection(org.eclipse.jdt.ls.core.internal.JavaClientConnection) Before(org.junit.Before)

Example 3 with JavaClientConnection

use of org.eclipse.jdt.ls.core.internal.JavaClientConnection in project eclipse.jdt.ls by eclipse.

the class NonProjectFixTest method setup.

@Before
public void setup() throws Exception {
    mockPreferences();
    javaClient = new JavaClientConnection(client);
    JavaLanguageServerPlugin.getNonProjectDiagnosticsState().setGlobalErrorLevel(true);
}
Also used : JavaClientConnection(org.eclipse.jdt.ls.core.internal.JavaClientConnection) Before(org.junit.Before)

Example 4 with JavaClientConnection

use of org.eclipse.jdt.ls.core.internal.JavaClientConnection in project eclipse.jdt.ls by eclipse.

the class DocumentLifeCycleHandlerTest method setup.

@Before
public void setup() throws Exception {
    mockPreferences();
    sharedASTProvider = CoreASTProvider.getInstance();
    sharedASTProvider.disposeAST();
    // sharedASTProvider.clearASTCreationCount();
    javaClient = new JavaClientConnection(client);
    lifeCycleHandler = new DocumentLifeCycleHandler(javaClient, preferenceManager, projectsManager, false);
    JavaLanguageServerPlugin.getNonProjectDiagnosticsState().setGlobalErrorLevel(true);
}
Also used : JavaClientConnection(org.eclipse.jdt.ls.core.internal.JavaClientConnection) Before(org.junit.Before)

Example 5 with JavaClientConnection

use of org.eclipse.jdt.ls.core.internal.JavaClientConnection in project eclipse.jdt.ls by eclipse.

the class CompletionHandlerTest method setUp.

@Before
public void setUp() {
    mockLSP3Client();
    CoreASTProvider sharedASTProvider = CoreASTProvider.getInstance();
    sharedASTProvider.disposeAST();
    // sharedASTProvider.clearASTCreationCount();
    javaClient = new JavaClientConnection(client);
    lifeCycleHandler = new DocumentLifeCycleHandler(javaClient, preferenceManager, projectsManager, true);
}
Also used : CoreASTProvider(org.eclipse.jdt.core.manipulation.CoreASTProvider) JavaClientConnection(org.eclipse.jdt.ls.core.internal.JavaClientConnection) Before(org.junit.Before)

Aggregations

JavaClientConnection (org.eclipse.jdt.ls.core.internal.JavaClientConnection)10 Before (org.junit.Before)9 DocumentLifeCycleHandler (org.eclipse.jdt.ls.core.internal.handlers.DocumentLifeCycleHandler)3 CoreASTProvider (org.eclipse.jdt.core.manipulation.CoreASTProvider)2 IProject (org.eclipse.core.resources.IProject)1 Test (org.junit.Test)1