mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
non-working code removed
This commit is contained in:
@@ -36,7 +36,7 @@ public class ShowModulePropertiesAction extends AnAction{
|
||||
if (module == null) {
|
||||
return;
|
||||
}
|
||||
ModulesConfigurator.showDialog(project, module.getName(), null, false);
|
||||
ModulesConfigurator.showDialog(project, module.getName(), null);
|
||||
}
|
||||
|
||||
public void update(AnActionEvent e) {
|
||||
|
||||
@@ -149,7 +149,7 @@ public class NewProjectUtil {
|
||||
public void run() {
|
||||
if (newProject.isDisposed()) return;
|
||||
if (need2OpenProjectStructure) {
|
||||
ModulesConfigurator.showDialog(newProject, null, null, true);
|
||||
ModulesConfigurator.showDialog(newProject, null, null);
|
||||
}
|
||||
ApplicationManager.getApplication().invokeLater(new Runnable() {
|
||||
public void run() {
|
||||
|
||||
+5
-5
@@ -53,7 +53,7 @@ public class IdeaProjectSettingsService extends ProjectSettingsService {
|
||||
}
|
||||
|
||||
public void openModuleSettings(final Module module) {
|
||||
ModulesConfigurator.showDialog(myProject, module.getName(), null, false);
|
||||
ModulesConfigurator.showDialog(myProject, module.getName(), null);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -62,7 +62,7 @@ public class IdeaProjectSettingsService extends ProjectSettingsService {
|
||||
}
|
||||
|
||||
public void openModuleLibrarySettings(final Module module) {
|
||||
ModulesConfigurator.showDialog(myProject, module.getName(), ClasspathEditor.NAME, false);
|
||||
ModulesConfigurator.showDialog(myProject, module.getName(), ClasspathEditor.NAME);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -71,7 +71,7 @@ public class IdeaProjectSettingsService extends ProjectSettingsService {
|
||||
}
|
||||
|
||||
public void openContentEntriesSettings(final Module module) {
|
||||
ModulesConfigurator.showDialog(myProject, module.getName(), ContentEntriesEditor.NAME, false);
|
||||
ModulesConfigurator.showDialog(myProject, module.getName(), ContentEntriesEditor.NAME);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -122,8 +122,8 @@ public class IdeaProjectSettingsService extends ProjectSettingsService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showModuleConfigurationDialog(String moduleToSelect, String editorNameToSelect, boolean showModuleWizard) {
|
||||
ModulesConfigurator.showDialog(myProject, moduleToSelect, editorNameToSelect, showModuleWizard);
|
||||
public void showModuleConfigurationDialog(String moduleToSelect, String editorNameToSelect) {
|
||||
ModulesConfigurator.showDialog(myProject, moduleToSelect, editorNameToSelect);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+2
-20
@@ -56,7 +56,6 @@ import com.intellij.util.graph.GraphGenerator;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.util.*;
|
||||
import java.util.List;
|
||||
@@ -120,10 +119,6 @@ public class ModulesConfigurator implements ModulesProvider, ModuleEditor.Change
|
||||
|
||||
}
|
||||
|
||||
public ProjectConfigurable getModulesConfigurable() {
|
||||
return myProjectConfigurable;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public Module[] getModules() {
|
||||
return myModuleModel.getModules();
|
||||
@@ -546,24 +541,11 @@ public class ModulesConfigurator implements ModulesProvider, ModuleEditor.Change
|
||||
});
|
||||
}
|
||||
|
||||
public static boolean showDialog(Project project,
|
||||
@Nullable final String moduleToSelect,
|
||||
@Nullable final String editorNameToSelect,
|
||||
final boolean showModuleWizard) {
|
||||
public static boolean showDialog(Project project, @Nullable final String moduleToSelect, @Nullable final String editorNameToSelect) {
|
||||
final ProjectStructureConfigurable config = ProjectStructureConfigurable.getInstance(project);
|
||||
return ShowSettingsUtil.getInstance().editConfigurable(project, config, new Runnable() {
|
||||
public void run() {
|
||||
final ModuleStructureConfigurable modulesConfig = config.getModulesConfig();
|
||||
config.select(moduleToSelect, editorNameToSelect, true).doWhenDone(new Runnable() {
|
||||
public void run() {
|
||||
modulesConfig.setStartModuleWizard(showModuleWizard);
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
public void run() {
|
||||
modulesConfig.setStartModuleWizard(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
config.select(moduleToSelect, editorNameToSelect, true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
+2
-34
@@ -53,8 +53,6 @@ import org.jetbrains.annotations.Nullable;
|
||||
import javax.swing.*;
|
||||
import javax.swing.event.DocumentEvent;
|
||||
import java.awt.*;
|
||||
import java.awt.event.WindowAdapter;
|
||||
import java.awt.event.WindowEvent;
|
||||
import java.io.IOException;
|
||||
import java.util.Collection;
|
||||
import java.util.Set;
|
||||
@@ -77,7 +75,7 @@ public class ProjectConfigurable extends NamedConfigurable<Project> implements D
|
||||
|
||||
private JTextField myProjectName;
|
||||
|
||||
private MyJPanel myPanel;
|
||||
private JPanel myPanel;
|
||||
|
||||
private final Alarm myUpdateWarningAlarm = new Alarm(Alarm.ThreadToUse.SHARED_THREAD);
|
||||
|
||||
@@ -95,7 +93,6 @@ public class ProjectConfigurable extends NamedConfigurable<Project> implements D
|
||||
init(model);
|
||||
}
|
||||
|
||||
|
||||
public DetailsComponent getDetailsComponent() {
|
||||
return myDetailsComponent;
|
||||
}
|
||||
@@ -111,7 +108,7 @@ public class ProjectConfigurable extends NamedConfigurable<Project> implements D
|
||||
}
|
||||
|
||||
private void init(final ProjectSdksModel model) {
|
||||
myPanel = new MyJPanel();
|
||||
myPanel = new JPanel(new GridBagLayout());
|
||||
myPanel.setPreferredSize(new Dimension(700, 500));
|
||||
|
||||
if (((ProjectEx)myProject).getStateStore().getStorageScheme().equals(StorageScheme.DIRECTORY_BASED)) {
|
||||
@@ -333,10 +330,6 @@ public class ProjectConfigurable extends NamedConfigurable<Project> implements D
|
||||
FileChooserFactory.getInstance().installFileCompletion(myProjectCompilerOutput.getTextField(), outputPathsChooserDescriptor, true, null);
|
||||
}
|
||||
|
||||
public void setStartModuleWizardOnShow(final boolean show) {
|
||||
myStartModuleWizardOnShow = show;
|
||||
}
|
||||
|
||||
public String getCompilerOutputUrl() {
|
||||
return VfsUtil.pathToUrl(myProjectCompilerOutput.getText().trim());
|
||||
}
|
||||
@@ -354,29 +347,4 @@ public class ProjectConfigurable extends NamedConfigurable<Project> implements D
|
||||
public void navigate() {
|
||||
}
|
||||
}
|
||||
|
||||
private class MyJPanel extends JPanel {
|
||||
public MyJPanel() {
|
||||
super(new GridBagLayout());
|
||||
}
|
||||
|
||||
public void addNotify() {
|
||||
super.addNotify();
|
||||
if (myStartModuleWizardOnShow) {
|
||||
final Window parentWindow = (Window)SwingUtilities.getAncestorOfClass(Window.class, this);
|
||||
parentWindow.addWindowListener(new WindowAdapter() {
|
||||
public void windowActivated(WindowEvent e) {
|
||||
parentWindow.removeWindowListener(this);
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
public void run() {
|
||||
myModulesConfigurator.addModule(parentWindow);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
+1
-2
@@ -20,7 +20,6 @@ import com.intellij.ide.util.projectWizard.ModuleBuilder;
|
||||
import com.intellij.ide.util.projectWizard.ProjectBuilder;
|
||||
import com.intellij.openapi.actionSystem.AnAction;
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||||
import com.intellij.openapi.actionSystem.PlatformDataKeys;
|
||||
import com.intellij.openapi.module.Module;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.project.ProjectBundle;
|
||||
@@ -72,7 +71,7 @@ public class NewModuleAction extends AnAction implements DumbAware {
|
||||
else {
|
||||
builder.commit(project, null, ModulesProvider.EMPTY_MODULES_PROVIDER);
|
||||
if (builder.isOpenProjectSettingsAfter()) {
|
||||
ModulesConfigurator.showDialog(project, null, null, true);
|
||||
ModulesConfigurator.showDialog(project, null, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
-4
@@ -420,10 +420,6 @@ public class ModuleStructureConfigurable extends BaseStructureConfigurable imple
|
||||
return ServiceManager.getService(project, ModuleStructureConfigurable.class);
|
||||
}
|
||||
|
||||
public void setStartModuleWizard(final boolean show) {
|
||||
myContext.myModulesConfigurator.getModulesConfigurable().setStartModuleWizardOnShow(show);
|
||||
}
|
||||
|
||||
public Project getProject() {
|
||||
return myProject;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user