-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #495 from codenvy/IDEX-3759
IDEX-3759: add ability to launch GWT Super DevMode for Che projects
- Loading branch information
Showing
50 changed files
with
1,103 additions
and
1,770 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
...dk-ext-plugins/src/main/java/org/eclipse/che/ide/ext/plugins/client/PluginsGinModule.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2012-2015 Codenvy, S.A. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* Codenvy, S.A. - initial API and implementation | ||
*******************************************************************************/ | ||
package org.eclipse.che.ide.ext.plugins.client; | ||
|
||
import com.google.gwt.inject.client.AbstractGinModule; | ||
import com.google.gwt.inject.client.multibindings.GinMultibinder; | ||
|
||
import org.eclipse.che.ide.api.extension.ExtensionGinModule; | ||
import org.eclipse.che.ide.ext.plugins.client.command.GwtCheCommandType; | ||
import org.eclipse.che.ide.extension.machine.client.command.CommandType; | ||
|
||
/** | ||
* GIN module for 'Che Plugins Development' extension. | ||
* | ||
* @author Artem Zatsarynnyi | ||
*/ | ||
@ExtensionGinModule | ||
public class PluginsGinModule extends AbstractGinModule { | ||
@Override | ||
protected void configure() { | ||
GinMultibinder.newSetBinder(binder(), CommandType.class).addBinding().to(GwtCheCommandType.class); | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
...ins/src/main/java/org/eclipse/che/ide/ext/plugins/client/PluginsLocalizationConstant.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2012-2015 Codenvy, S.A. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* Codenvy, S.A. - initial API and implementation | ||
*******************************************************************************/ | ||
package org.eclipse.che.ide.ext.plugins.client; | ||
|
||
import com.google.gwt.i18n.client.Messages; | ||
|
||
/** | ||
* Localization constants. Interface represents the constants contained in resource bundle: | ||
* 'PluginsLocalizationConstant.properties'. | ||
* | ||
* @author Artem Zatsarynnyi | ||
*/ | ||
public interface PluginsLocalizationConstant extends Messages { | ||
|
||
/* CommandPageView */ | ||
@Key("view.gwtCheCommandPage.gwtModule.text") | ||
String gwtCheCommandPageViewGwtModuleText(); | ||
|
||
@Key("view.gwtCheCommandPage.codeServerAddress.text") | ||
String gwtCommandPageViewCodeServerAddressText(); | ||
|
||
@Key("view.gwtCheCommandPage.classPath.text") | ||
String gwtCommandPageViewClassPathText(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
91 changes: 91 additions & 0 deletions
91
...ns/src/main/java/org/eclipse/che/ide/ext/plugins/client/command/CommandPagePresenter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2012-2015 Codenvy, S.A. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* Codenvy, S.A. - initial API and implementation | ||
*******************************************************************************/ | ||
package org.eclipse.che.ide.ext.plugins.client.command; | ||
|
||
import com.google.gwt.user.client.ui.AcceptsOneWidget; | ||
import com.google.inject.Inject; | ||
import com.google.inject.Singleton; | ||
|
||
import org.eclipse.che.ide.extension.machine.client.command.CommandConfigurationPage; | ||
|
||
import javax.validation.constraints.NotNull; | ||
|
||
/** | ||
* Page allows to configure {@link GwtCheCommandConfiguration} command parameters. | ||
* | ||
* @author Artem Zatsarynnyi | ||
*/ | ||
@Singleton | ||
public class CommandPagePresenter implements CommandPageView.ActionDelegate, CommandConfigurationPage<GwtCheCommandConfiguration> { | ||
|
||
private final CommandPageView view; | ||
|
||
private GwtCheCommandConfiguration editedConfiguration; | ||
/** GWT module value before any editing. */ | ||
private String originGwtModule; | ||
/** Code server address value before any editing. */ | ||
private String originCodeServerAddress; | ||
private String originClassPath; | ||
private DirtyStateListener listener; | ||
|
||
@Inject | ||
public CommandPagePresenter(CommandPageView view) { | ||
this.view = view; | ||
view.setDelegate(this); | ||
} | ||
|
||
@Override | ||
public void resetFrom(@NotNull GwtCheCommandConfiguration configuration) { | ||
editedConfiguration = configuration; | ||
originGwtModule = configuration.getGwtModule(); | ||
originCodeServerAddress = configuration.getCodeServerAddress(); | ||
originClassPath = configuration.getClassPath(); | ||
} | ||
|
||
@Override | ||
public void go(AcceptsOneWidget container) { | ||
container.setWidget(view); | ||
|
||
view.setGwtModule(editedConfiguration.getGwtModule()); | ||
view.setCodeServerAddress(editedConfiguration.getCodeServerAddress()); | ||
view.setClassPath(editedConfiguration.getClassPath()); | ||
} | ||
|
||
@Override | ||
public boolean isDirty() { | ||
return !(originGwtModule.equals(editedConfiguration.getGwtModule()) && | ||
originCodeServerAddress.equals(editedConfiguration.getCodeServerAddress()) && | ||
originClassPath.equals(editedConfiguration.getClassPath())); | ||
} | ||
|
||
@Override | ||
public void setDirtyStateListener(@NotNull DirtyStateListener listener) { | ||
this.listener = listener; | ||
} | ||
|
||
@Override | ||
public void onGwtModuleChanged() { | ||
editedConfiguration.setGwtModule(view.getGwtModule()); | ||
listener.onDirtyStateChanged(); | ||
} | ||
|
||
@Override | ||
public void onCodeServerAddressChanged() { | ||
editedConfiguration.setCodeServerAddress(view.getCodeServerAddress()); | ||
listener.onDirtyStateChanged(); | ||
} | ||
|
||
@Override | ||
public void onClassPathChanged() { | ||
editedConfiguration.setClassPath(view.getClassPath()); | ||
listener.onDirtyStateChanged(); | ||
} | ||
} |
Oops, something went wrong.