Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CHE-976: Generify debugge API #1159

Merged
merged 7 commits into from
May 12, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 4 additions & 4 deletions assembly/assembly-ide-war/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@
<groupId>org.eclipse.che.core</groupId>
<artifactId>che-core-client-gwt-core</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.che.core</groupId>
<artifactId>che-core-client-gwt-debugger</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.che.core</groupId>
<artifactId>che-core-client-gwt-factory</artifactId>
Expand Down Expand Up @@ -168,10 +172,6 @@
<groupId>org.eclipse.che.plugin</groupId>
<artifactId>che-plugin-debugger-ide</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.che.plugin</groupId>
<artifactId>che-plugin-debugger-shared</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.che.plugin</groupId>
<artifactId>che-plugin-docker-client</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
<!-- Extensions -->
<inherits name='org.eclipse.che.ide.ext.help.HelpAboutExtension'/>
<inherits name='org.eclipse.che.ide.ext.web.Web'/>
<inherits name='org.eclipse.che.ide.ext.debugger.DebuggerExtension'/>
<inherits name='org.eclipse.che.ide.gdb.GdbExtension'/>
<inherits name='org.eclipse.che.ide.ext.java.jdi.JavaDebuggerExtension'/>
<inherits name='org.eclipse.che.plugin.debugger.Debugger'/>
<inherits name='org.eclipse.che.plugin.gdb.Gdb'/>
<inherits name='org.eclipse.che.plugin.jdb.JavaDebugger'/>
<inherits name='org.eclipse.che.ide.extension.machine.Machine'/>
<inherits name='org.eclipse.che.plugin.maven.Maven'/>
<inherits name='org.eclipse.che.ide.ext.gwt.GWT'/>
Expand Down Expand Up @@ -76,6 +76,7 @@
<inherits name='org.eclipse.che.api.Factory'/>
<inherits name="org.eclipse.che.api.Workspace"/>
<inherits name="org.eclipse.che.api.Ssh"/>
<inherits name='org.eclipse.che.api.Debugger'/>

<stylesheet src="IDE.css"/>

Expand Down
8 changes: 4 additions & 4 deletions assembly/assembly-machine-war/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@
<groupId>org.eclipse.che.core</groupId>
<artifactId>che-core-api-core</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.che.core</groupId>
<artifactId>che-core-api-debugger</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.che.core</groupId>
<artifactId>che-core-api-git</artifactId>
Expand Down Expand Up @@ -103,10 +107,6 @@
<groupId>org.eclipse.che.plugin</groupId>
<artifactId>che-plugin-cpp-lang-shared</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.che.plugin</groupId>
<artifactId>che-plugin-debugger-shared</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.che.plugin</groupId>
<artifactId>che-plugin-gdb-server</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,13 @@
import org.eclipse.che.api.vfs.VirtualFileSystemModule;
import org.eclipse.che.commons.lang.Pair;
import org.eclipse.che.everrest.CheAsynchronousJobPool;
import org.eclipse.che.plugin.maven.generator.archetype.ArchetypeGenerator;
import org.eclipse.che.plugin.maven.generator.archetype.ArchetypeGeneratorModule;
import org.eclipse.che.git.impl.nativegit.LocalGitUserResolver;
import org.eclipse.che.git.impl.nativegit.NativeGitConnectionFactory;
import org.eclipse.che.ide.ext.java.jdi.server.JavaDebuggerService;
import org.eclipse.che.plugin.maven.server.inject.MavenModule;
import org.eclipse.che.ide.gdb.server.GdbDebuggerService;
import org.eclipse.che.inject.DynaModule;
import org.eclipse.che.plugin.github.server.inject.GitHubModule;
import org.eclipse.che.plugin.maven.generator.archetype.ArchetypeGenerator;
import org.eclipse.che.plugin.maven.generator.archetype.ArchetypeGeneratorModule;
import org.eclipse.che.plugin.maven.server.inject.MavenModule;
import org.eclipse.che.security.oauth.RemoteOAuthTokenProvider;
import org.everrest.core.impl.async.AsynchronousJobPool;
import org.everrest.core.impl.async.AsynchronousJobService;
Expand Down Expand Up @@ -73,10 +71,9 @@ protected void configure() {
install(new ArchetypeGeneratorModule());
install(new GitHubModule());
install(new org.eclipse.che.swagger.deploy.DocsModule());
install(new org.eclipse.che.api.debugger.server.DebuggerModule());

bind(ArchetypeGenerator.class);
bind(JavaDebuggerService.class);
bind(GdbDebuggerService.class);

bind(GitUserResolver.class).to(LocalGitUserResolver.class);
bind(GitConnectionFactory.class).to(NativeGitConnectionFactory.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@
*******************************************************************************/
package org.eclipse.che.ide.rest;

import org.eclipse.che.ide.MimeType;
import org.eclipse.che.ide.dto.DtoFactory;
import com.google.gwt.http.client.RequestBuilder;
import com.google.inject.Inject;
import com.google.inject.Singleton;

import org.eclipse.che.ide.MimeType;
import org.eclipse.che.ide.dto.DtoFactory;

import java.util.List;

/**
Expand Down Expand Up @@ -71,6 +72,20 @@ public AsyncRequest createPostRequest(String url, Object dtoData) {
return createPostRequest(url, dtoData, false);
}

/**
* Creates new PUT request to the specified {@code url} with the provided {@code data}.
*
* @param url
* request URL
* @param dtoData
* the DTO to send as body of the request. Must implement {@link org.eclipse.che.ide.dto.JsonSerializable} interface. May be {@code
* null}.
* @return new {@link AsyncRequest} instance to send PUT request
*/
public AsyncRequest createPutRequest(String url, Object dtoData) {
return createPutRequest(url, dtoData, false);
}

/**
* Creates new POST request to the specified {@code url} with the provided {@code data}.
*
Expand Down Expand Up @@ -101,6 +116,23 @@ public AsyncRequest createPostRequest(String url, Object dtoData, boolean async)
return createRequest(RequestBuilder.POST, url, dtoData, async);
}

/**
* Creates new PUT request to the specified {@code url} with the provided {@code data}.
*
* @param url
* request URL
* @param dtoData
* the DTO to send as body of the request. Must implement {@link org.eclipse.che.ide.dto.JsonSerializable} interface. May be {@code
* null}.
* @param async
* if <b>true</b> - request will be sent in asynchronous mode
* @return new {@link AsyncRequest} instance to send POST request
*/
public AsyncRequest createPutRequest(String url, Object dtoData, boolean async) {
return createRequest(RequestBuilder.PUT, url, dtoData, async);
}


/**
* Creates new POST request to the specified {@code url} with the provided {@code data}.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public class Breakpoint {
protected int lineNumber;
protected VirtualFile file;
private Type type;
private String message;
private String path;

/**
Expand All @@ -34,14 +33,9 @@ public class Breakpoint {
private boolean active;

public Breakpoint(Type type, int lineNumber, String path, VirtualFile file, boolean active) {
this(type, lineNumber, path, file, null, active);
}

public Breakpoint(Type type, int lineNumber, String path, VirtualFile file, String message, boolean active) {
this.type = type;
this.lineNumber = lineNumber;
this.path = path;
this.message = message;
this.file = file;
this.active = active;
}
Expand All @@ -63,11 +57,6 @@ public int getLineNumber() {
return lineNumber;
}

/** @return the message */
public String getMessage() {
return message;
}

/** @return file path */
public String getPath() {
return path;
Expand All @@ -88,7 +77,6 @@ public String toString() {
builder.append("Breakpoint [lineNumber=").append(lineNumber)
.append(", type=").append(type)
.append(", active=").append(active)
.append(", message=").append(message)
.append(", path=").append(path)
.append("]");
return builder.toString();
Expand All @@ -112,6 +100,6 @@ public int hashCode() {
}

public enum Type {
BREAKPOINT, DISABLED, CONDITIONAL, CURRENT
BREAKPOINT, CURRENT
}
}
}
12 changes: 12 additions & 0 deletions core/ide/che-core-ide-app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@
<groupId>org.eclipse.che.core</groupId>
<artifactId>che-core-api-core</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.che.core</groupId>
<artifactId>che-core-api-debugger-shared</artifactId>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplicate declaration

</dependency>
<dependency>
<groupId>org.eclipse.che.core</groupId>
<artifactId>che-core-api-debugger-shared</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.che.core</groupId>
<artifactId>che-core-api-dto</artifactId>
Expand Down Expand Up @@ -99,6 +107,10 @@
<groupId>org.eclipse.che.core</groupId>
<artifactId>che-core-client-gwt-core</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.che.core</groupId>
<artifactId>che-core-client-gwt-debugger</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.che.core</groupId>
<artifactId>che-core-client-gwt-factory</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
import org.eclipse.che.api.account.gwt.client.AccountServiceClientImpl;
import org.eclipse.che.api.auth.client.OAuthServiceClient;
import org.eclipse.che.api.auth.client.OAuthServiceClientImpl;
import org.eclipse.che.api.debugger.gwt.client.DebuggerServiceClient;
import org.eclipse.che.api.debugger.gwt.client.DebuggerServiceClientImpl;
import org.eclipse.che.api.factory.gwt.client.FactoryServiceClient;
import org.eclipse.che.api.factory.gwt.client.FactoryServiceClientImpl;
import org.eclipse.che.api.git.gwt.client.GitServiceClient;
Expand Down Expand Up @@ -338,6 +340,7 @@ private void configurePlatformApiGwtClients() {
bind(MachineServiceClient.class).to(MachineServiceClientImpl.class).in(Singleton.class);
bind(ProjectTypeRegistry.class).to(ProjectTypeRegistryImpl.class).in(Singleton.class);
bind(ProjectTemplateRegistry.class).to(ProjectTemplateRegistryImpl.class).in(Singleton.class);
bind(DebuggerServiceClient.class).to(DebuggerServiceClientImpl.class).in(Singleton.class);
}

/** API Bindings, binds API interfaces to the implementations */
Expand Down
Loading