Skip to content

Commit

Permalink
initial work on new connection dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
jjallaire committed May 24, 2016
1 parent c08f158 commit 8c1071d
Show file tree
Hide file tree
Showing 6 changed files with 380 additions and 14 deletions.
29 changes: 29 additions & 0 deletions src/gwt/src/org/rstudio/core/client/widget/VerticalSpacer.java
@@ -0,0 +1,29 @@
/*
* VerticalSpacer.java
*
* Copyright (C) 2009-12 by RStudio, Inc.
*
* Unless you have received this program directly from RStudio pursuant
* to the terms of a commercial license agreement with RStudio, then
* this program is licensed to you under the terms of version 3 of the
* GNU Affero General Public License. This program is distributed WITHOUT
* ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT,
* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the
* AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details.
*
*/

package org.rstudio.core.client.widget;

import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.FlowPanel;

public class VerticalSpacer extends Composite
{
public VerticalSpacer(String height)
{
FlowPanel panel = new FlowPanel();
panel.setHeight(height);
initWidget(panel);
}
}
2 changes: 2 additions & 0 deletions src/gwt/src/org/rstudio/studio/client/RStudioGinjector.java
Expand Up @@ -80,6 +80,7 @@
import org.rstudio.studio.client.workbench.snippets.SnippetHelper;
import org.rstudio.studio.client.workbench.snippets.ui.EditSnippetsDialog;
import org.rstudio.studio.client.workbench.ui.ConsoleTabPanel;
import org.rstudio.studio.client.workbench.views.connections.ui.NewSparkConnectionDialog;
import org.rstudio.studio.client.workbench.views.console.shell.assist.CompletionRequester;
import org.rstudio.studio.client.workbench.views.console.shell.assist.HelpStrategy;
import org.rstudio.studio.client.workbench.views.console.shell.assist.RCompletionManager;
Expand Down Expand Up @@ -176,6 +177,7 @@ public interface RStudioGinjector extends Ginjector
void injectMembers(CppCompletion completion);
void injectMembers(ConsoleTabPanel consoleTabPanel);
void injectMembers(VirtualConsole console);
void injectMembers(NewSparkConnectionDialog newSparkConnectionDialog);

public static final RStudioGinjector INSTANCE = GWT.create(RStudioGinjector.class);

Expand Down
Expand Up @@ -33,6 +33,7 @@
import org.rstudio.core.client.js.JsObject;
import org.rstudio.core.client.widget.MessageDialog;
import org.rstudio.core.client.widget.Operation;
import org.rstudio.core.client.widget.OperationWithInput;
import org.rstudio.studio.client.application.events.EventBus;
import org.rstudio.studio.client.common.GlobalDisplay;
import org.rstudio.studio.client.common.SimpleRequestCallback;
Expand All @@ -52,6 +53,8 @@
import org.rstudio.studio.client.workbench.views.connections.model.Connection;
import org.rstudio.studio.client.workbench.views.connections.model.ConnectionId;
import org.rstudio.studio.client.workbench.views.connections.model.ConnectionsServerOperations;
import org.rstudio.studio.client.workbench.views.connections.ui.NewSparkConnectionDialog;
import org.rstudio.studio.client.workbench.views.connections.ui.NewSparkConnectionDialog.Result;
import org.rstudio.studio.client.workbench.views.console.events.SendToConsoleEvent;

public class ConnectionsPresenter extends BasePresenter
Expand Down Expand Up @@ -222,7 +225,15 @@ public void onActiveConnectionsChanged(ActiveConnectionsChangedEvent event)

public void onNewConnection()
{
globalDisplay_.showErrorMessage("Error", "Not Yet Implemented");
new NewSparkConnectionDialog(
new OperationWithInput<NewSparkConnectionDialog.Result>() {
@Override
public void execute(Result input)
{


}
}).showModal();;
}

@Handler
Expand Down Expand Up @@ -348,7 +359,7 @@ public boolean test(Connection connection)
private final ConnectionsServerOperations server_ ;

// client state
private static final String MODULE_CONNECTIONS = "connections-pane";
public static final String MODULE_CONNECTIONS = "connections-pane";
private static final String KEY_EXPLORED_CONNECTION = "exploredConnection";
private Connection exploredConnection_;
private Connection lastExploredConnection_;
Expand Down
@@ -0,0 +1,32 @@
@CHARSET "UTF-8";

@external gwt-Label;


.grid {
margin-bottom: 5px;
}

.versionGrid {
margin-top: 20px;
}

.label {
width: 150px;
}

.spanningListBox {
width: 250px;
}

.textBox {
width: 250px;
}

.helpLink {
margin-top: 6px;
}

.installCheckBox {

}

0 comments on commit 8c1071d

Please sign in to comment.