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

CHE-976: Generify debugge API #1159

merged 7 commits into from
May 12, 2016

Conversation

tolusha
Copy link
Contributor

@tolusha tolusha commented Apr 29, 2016

No description provided.

import java.util.Map;

/**
* The client-side service to debug application.
Copy link
Member

Choose a reason for hiding this comment

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

I'd say it's rather Client for the service to debug application.
As for me, unusuall definition - client-side service

@tolusha
Copy link
Contributor Author

tolusha commented Apr 29, 2016

@evoevodin
@sleshchenko
@vparfonov

@@ -68,10 +67,9 @@ protected void configure() {
install(new ArchetypeGeneratorModule());
install(new GitHubModule());
install(new org.eclipse.che.swagger.deploy.DocsModule());
install(new DebuggerModule());
Copy link
Contributor

Choose a reason for hiding this comment

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

I think here should be full fqn: install(new org.eclipse.che.api.debugger.server.DebuggerModule());

@gazarenkov
Copy link
Contributor

DTO objects are for transport only, for sending/receiving stuffs via REST
Never use them for business logic/SPI etc (like Debugger)
See how other services do: we have model interfaces (mostly with getters), DTOs which implement model and other implementations.
DTO are really light and can not contain business logic inside, so using them for business needs leads to complex (non OOP friendly) logic.

@codenvy-ci
Copy link

Build finished.

Map<String, String> locals = gdb.infoLocals().getVariables();
locals.putAll(gdb.infoArgs().getVariables());

List<Variable> variables = new ArrayList<>();
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems that you already know the size of the ArrayList at this point

@codenvy-ci
Copy link

Build finished.

@Override
public Debugger create(Map<String, String> properties, Debugger.DebuggerCallBack debuggerCallBack) throws DebuggerException {
Map<String, String> normalizedProps = new HashMap<>(properties.size());
properties.keySet().stream().forEach(key -> normalizedProps.put(key.toLowerCase(), properties.get(key)));
Copy link
Contributor

Choose a reason for hiding this comment

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

I prefer to use collect in such cases

normalizedProps = properties.entrySet()
                            .stream()
                            .collect(toMap(e -> e.getKey().toLowerCase(), Map.Entry::getValue);     

@voievodin
Copy link
Contributor

Well, i reviewed 20% of the pull request and it is impossible to review the rest, because pull request is too large. @tolusha can you please separate you pull request on different commits, e.g. (model, spi, api, refactoring) because it is impossible to review some classes such as DebuggerManager, let me know when it is ready for the review

@tolusha
Copy link
Contributor Author

tolusha commented May 10, 2016

@vparfonov @gazarenkov

@@ -57,6 +57,14 @@
</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

@codenvy-ci
Copy link

Build finished.

1 similar comment
@codenvy-ci
Copy link

Build finished.

@codenvy-ci
Copy link

Build finished.

@codenvy-ci
Copy link

Build finished.

@vparfonov
Copy link
Contributor

Don't review all changes because a lot of files, but basically looks good for me

ok

@tolusha tolusha merged commit 00f82b4 into master May 12, 2016
@codenvy-ci
Copy link

@tolusha tolusha deleted the CHE-976 branch May 12, 2016 14:06
@codenvy-ci
Copy link

@codenvy-ci
Copy link

Build # 555 - $BUILD_STATUS:

Please check console output at http://ci.codenvy-dev.com/jenkins/job/che-pullrequests-build/555/ to view the results.

Failed tests: ${FAILED_TESTS}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants