<orderEntry type="library" name="commons-lang" level="project" />
<orderEntry type="library" scope="TEST" name="TestNG" level="project" />
<orderEntry type="module" module-name="testFramework" scope="TEST" />
- <orderEntry type="module" module-name="idea-ui" />
<orderEntry type="module" module-name="platform-api" />
<orderEntry type="module" module-name="vcs-impl" />
</component>
hg4idea.init.already.under.hg.description=<html>The selected directory <b><code>{0}</code></b> is already under Mercurial: <b><code>{1}</code></b><br/>Would you like to create new repository in the selected folder or use the parent one?</html>
hg4idea.init.already.under.hg.title=This directory is already under hg
hg4idea.init.already.under.hg.dialog.title=Directory is under hg
-hg4idea.init.already.under.hg.option.create.project.at.parent=Use parent repository and create IDEA project for it.
hg4idea.init.already.under.hg.option.use.parent=Use parent repository, but keep working in this project.
hg4idea.init.already.under.hg.option.create.repo.here=Create new repository here.
hg4idea.init.created.notification.title=Mercurial repository created
package org.zmlx.hg4idea.action;
-import com.intellij.ide.impl.NewProjectUtil;
import com.intellij.notification.Notification;
import com.intellij.notification.NotificationType;
import com.intellij.notification.Notifications;
return;
}
- if (dialog.getAnswer() == HgInitAlreadyUnderHgDialog.Answer.CREATE_PROJECT_AT_PARENT) {
- NewProjectUtil.createNewProject(myProject, vcsRoot.getPath());
- return;
- } else if (dialog.getAnswer() == HgInitAlreadyUnderHgDialog.Answer.USE_PARENT_REPO_BUT_THIS_PROJECT) {
+ if (dialog.getAnswer() == HgInitAlreadyUnderHgDialog.Answer.USE_PARENT_REPO) {
mapRoot = vcsRoot;
} else if (dialog.getAnswer() == HgInitAlreadyUnderHgDialog.Answer.CREATE_REPO_HERE) {
createRepository(selectedRoot);
<properties/>
<border type="none"/>
<children>
- <grid id="e3588" layout-manager="GridLayoutManager" row-count="4" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
+ <grid id="e3588" layout-manager="GridLayoutManager" row-count="3" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
<properties/>
<border type="none"/>
<children>
- <component id="1b523" class="javax.swing.JRadioButton" binding="myCreateNewRepositoryHereRadioButton" default-binding="true">
+ <component id="1b523" class="javax.swing.JRadioButton" binding="myCreateNewRepoButton" default-binding="true">
<constraints>
- <grid row="3" column="0" row-span="1" col-span="2" vsize-policy="0" hsize-policy="6" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+ <grid row="2" column="0" row-span="1" col-span="2" vsize-policy="0" hsize-policy="6" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
+ <selected value="true"/>
<text resource-bundle="org/zmlx/hg4idea/HgVcsMessages" key="hg4idea.init.already.under.hg.option.create.repo.here"/>
</properties>
</component>
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
</constraints>
</vspacer>
- <component id="ef06d" class="javax.swing.JRadioButton" binding="myUseParentRepoButThisProjectButton">
- <constraints>
- <grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
- </constraints>
- <properties>
- <text resource-bundle="org/zmlx/hg4idea/HgVcsMessages" key="hg4idea.init.already.under.hg.option.use.parent"/>
- </properties>
- </component>
- <component id="f180f" class="javax.swing.JRadioButton" binding="myUseParentRepoAndCreateProjectButton">
+ <component id="ef06d" class="javax.swing.JRadioButton" binding="myUseParentRepoButton">
<constraints>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
- <text resource-bundle="org/zmlx/hg4idea/HgVcsMessages" key="hg4idea.init.already.under.hg.option.create.project.at.parent"/>
+ <text resource-bundle="org/zmlx/hg4idea/HgVcsMessages" key="hg4idea.init.already.under.hg.option.use.parent"/>
</properties>
</component>
<component id="244a3" class="com.intellij.openapi.ui.TitlePanel" binding="myTitlePanel" custom-create="true">
*/
public class HgInitAlreadyUnderHgDialog extends DialogWrapper {
private JPanel contentPane;
- private JRadioButton myCreateNewRepositoryHereRadioButton;
- private JRadioButton myUseParentRepoButThisProjectButton;
- private JRadioButton myUseParentRepoAndCreateProjectButton;
+ private JRadioButton myCreateNewRepoButton;
+ private JRadioButton myUseParentRepoButton;
private TitlePanel myTitlePanel;
private String myParentRoot;
private String mySelectedRoot;
public enum Answer {
- CREATE_PROJECT_AT_PARENT,
- USE_PARENT_REPO_BUT_THIS_PROJECT,
+ USE_PARENT_REPO,
CREATE_REPO_HERE
}
}
public Answer getAnswer() {
- if (myCreateNewRepositoryHereRadioButton.isSelected()) {
+ if (myCreateNewRepoButton.isSelected()) {
return Answer.CREATE_REPO_HERE;
- } else if (myUseParentRepoAndCreateProjectButton.isSelected()) {
- return Answer.CREATE_PROJECT_AT_PARENT;
} else {
- return Answer.USE_PARENT_REPO_BUT_THIS_PROJECT;
+ return Answer.USE_PARENT_REPO;
}
}
protected void init() {
super.init();
final ButtonGroup buttonGroup = new ButtonGroup();
- buttonGroup.add(myCreateNewRepositoryHereRadioButton);
- buttonGroup.add(myUseParentRepoAndCreateProjectButton);
- buttonGroup.add(myUseParentRepoButThisProjectButton);
+ buttonGroup.add(myCreateNewRepoButton);
+ buttonGroup.add(myUseParentRepoButton);
}
@Override