Merge branch 'master' of git.labs.intellij.net:idea/community

This commit is contained in:
Kirill Likhodedov
2010-08-12 12:21:09 +04:00
305 changed files with 9792 additions and 482 deletions
@@ -17,17 +17,19 @@ package com.intellij.packaging.impl.elements;
import com.intellij.compiler.ant.BuildProperties;
import com.intellij.compiler.ant.Generator;
import com.intellij.compiler.ant.Tag;
import com.intellij.compiler.ant.artifacts.ArchiveAntCopyInstructionCreator;
import com.intellij.compiler.ant.taskdefs.Jar;
import com.intellij.compiler.ant.taskdefs.Zip;
import com.intellij.packaging.artifacts.ArtifactType;
import com.intellij.packaging.elements.*;
import com.intellij.packaging.impl.ui.ArchiveElementPresentation;
import com.intellij.packaging.ui.PackagingElementPresentation;
import com.intellij.packaging.ui.ArtifactEditorContext;
import com.intellij.util.xmlb.annotations.Attribute;
import com.intellij.packaging.ui.PackagingElementPresentation;
import com.intellij.util.xmlb.XmlSerializerUtil;
import org.jetbrains.annotations.NotNull;
import com.intellij.util.xmlb.annotations.Attribute;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import java.util.Collections;
import java.util.List;
@@ -58,7 +60,13 @@ public class ArchivePackagingElement extends CompositeElementWithManifest<Archiv
@NotNull ArtifactType artifactType) {
final String tempJarProperty = generationContext.createNewTempFileProperty("temp.jar.path." + myArchiveFileName, myArchiveFileName);
String jarPath = BuildProperties.propertyRef(tempJarProperty);
final Jar jar = new Jar(jarPath, "preserve", true);
final Tag jar;
if (myArchiveFileName.endsWith(".jar")) {
jar = new Jar(jarPath, "preserve", true);
}
else {
jar = new Zip(jarPath);
}
for (Generator generator : computeChildrenGenerators(resolvingContext, new ArchiveAntCopyInstructionCreator(""), generationContext, artifactType)) {
jar.add(generator);
}
@@ -56,8 +56,8 @@ public class ChooseLibrariesDialog extends DialogWrapper {
return myChooser.getMarkedElements();
}
private static class LibraryElementChooser extends ElementsChooser<Library> {
private LibraryElementChooser(final List<Library> elements) {
static class LibraryElementChooser extends ElementsChooser<Library> {
LibraryElementChooser(final List<Library> elements) {
super(elements, false);
}
@@ -0,0 +1,94 @@
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="com.intellij.facet.impl.ui.libraries.DownloadingOptionsDialog">
<grid id="27dc6" binding="myPanel" layout-manager="GridLayoutManager" row-count="7" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<xy x="20" y="20" width="500" height="228"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<vspacer id="54e08">
<constraints>
<grid row="6" column="0" 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="604d3" class="javax.swing.JLabel" binding="myFilesToDownloadLabel">
<constraints>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="&amp;Files to download:"/>
</properties>
</component>
<component id="dd86" class="com.intellij.openapi.ui.TextFieldWithBrowseButton" binding="myDirectoryField">
<constraints>
<grid row="5" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
</component>
<component id="85001" class="javax.swing.JLabel" binding="myCopyDownloadedFilesToLabel">
<constraints>
<grid row="4" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Copy downloaded files &amp;to:"/>
</properties>
</component>
<scrollpane id="117b3" class="com.intellij.ui.components.JBScrollPane">
<constraints>
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<component id="45c8c" class="com.intellij.ui.CheckBoxList" binding="myFilesList">
<constraints/>
<properties/>
</component>
</children>
</scrollpane>
<grid id="6bec" layout-manager="GridLayoutManager" row-count="1" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<component id="b5e3e" class="javax.swing.JCheckBox" binding="myDownloadSourcesCheckBox" default-binding="true">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<focusable value="false"/>
<text value="Download &amp;sources"/>
</properties>
</component>
<hspacer id="598d">
<constraints>
<grid row="0" column="2" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
</hspacer>
<component id="f9d9a" class="javax.swing.JCheckBox" binding="myDownloadJavadocsCheckBox" default-binding="true">
<constraints>
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<focusable value="false"/>
<text value="Download &amp;javadocs"/>
</properties>
</component>
</children>
</grid>
<grid id="f9161" binding="myNameWrappingPanel" layout-manager="BorderLayout" hgap="0" vgap="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"/>
</constraints>
<properties/>
<border type="none"/>
<children/>
</grid>
</children>
</grid>
</form>
@@ -0,0 +1,99 @@
/*
* Copyright 2000-2010 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.facet.impl.ui.libraries;
import com.intellij.facet.ui.libraries.LibraryInfo;
import com.intellij.openapi.fileChooser.FileChooserDescriptorFactory;
import com.intellij.openapi.project.ProjectBundle;
import com.intellij.openapi.ui.DialogWrapper;
import com.intellij.openapi.ui.TextFieldWithBrowseButton;
import com.intellij.ui.CheckBoxList;
import com.intellij.ui.CollectionListModel;
import com.intellij.util.Function;
import com.intellij.util.containers.ContainerUtil;
import javax.swing.*;
import java.awt.*;
/**
* @author Dmitry Avdeev
*/
public class DownloadingOptionsDialog extends DialogWrapper {
private JPanel myPanel;
private CheckBoxList myFilesList;
private TextFieldWithBrowseButton myDirectoryField;
private JCheckBox myDownloadSourcesCheckBox;
private JLabel myFilesToDownloadLabel;
private JLabel myCopyDownloadedFilesToLabel;
private JCheckBox myDownloadJavadocsCheckBox;
private JPanel myNameWrappingPanel;
private final LibraryCompositionSettings mySettings;
private final LibraryNameAndLevelPanel myNameAndLevelPanel;
protected DownloadingOptionsDialog(Component parent, LibraryCompositionSettings settings) {
super(parent, true);
setTitle("Downloading Options");
mySettings = settings;
myFilesList.setModel(new CollectionListModel(ContainerUtil.map2Array(settings.getLibraryInfos(), new Function<LibraryInfo, Object>() {
@Override
public Object fun(LibraryInfo libraryInfo) {
return new JCheckBox(libraryInfo.getPresentableName(), libraryInfo.isSelected());
}
})));
myFilesToDownloadLabel.setLabelFor(myFilesList);
myDirectoryField.addBrowseFolderListener(ProjectBundle.message("file.chooser.directory.for.downloaded.libraries.title"),
ProjectBundle.message("file.chooser.directory.for.downloaded.libraries.description"), null,
FileChooserDescriptorFactory.createSingleFolderDescriptor());
myCopyDownloadedFilesToLabel.setLabelFor(myDirectoryField);
myDirectoryField.setText(settings.getDirectoryForDownloadedLibrariesPath());
myDownloadSourcesCheckBox.setSelected(settings.isDownloadSources());
myDownloadJavadocsCheckBox.setSelected(settings.isDownloadJavadocs());
myNameAndLevelPanel = new LibraryNameAndLevelPanel();
myNameWrappingPanel.add(myNameAndLevelPanel.getPanel());
myNameAndLevelPanel.reset(settings);
init();
}
@Override
protected JComponent createCenterPanel() {
return myPanel;
}
@Override
public JComponent getPreferredFocusedComponent() {
return myFilesList;
}
@Override
protected void doOKAction() {
myNameAndLevelPanel.apply(mySettings);
mySettings.setDirectoryForDownloadedLibrariesPath(myDirectoryField.getText());
LibraryInfo[] libraryInfos = mySettings.getLibraryInfos();
for (int i = 0, libraryInfosLength = libraryInfos.length; i < libraryInfosLength; i++) {
LibraryInfo info = libraryInfos[i];
info.setSelected(myFilesList.isItemSelected(i));
}
mySettings.setDownloadSources(myDownloadSourcesCheckBox.isSelected());
mySettings.setDownloadJavadocs(myDownloadJavadocsCheckBox.isSelected());
super.doOKAction();
}
}
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="com.intellij.facet.impl.ui.libraries.EditLibraryDialog">
<grid id="27dc6" binding="myPanel" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<xy x="20" y="20" width="500" height="400"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<grid id="d0dbf" binding="myEditorPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
<children/>
</grid>
<grid id="8ed98" binding="myNameAndLevelPanelWrapper" layout-manager="BorderLayout" hgap="0" vgap="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"/>
</constraints>
<properties/>
<border type="none"/>
<children/>
</grid>
</children>
</grid>
</form>
@@ -0,0 +1,93 @@
/*
* Copyright 2000-2010 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.facet.impl.ui.libraries;
import com.intellij.openapi.roots.libraries.Library;
import com.intellij.openapi.roots.libraries.LibraryTable;
import com.intellij.openapi.roots.libraries.LibraryTablePresentation;
import com.intellij.openapi.roots.ui.configuration.LibraryTableModifiableModelProvider;
import com.intellij.openapi.roots.ui.configuration.libraryEditor.LibraryTableEditor;
import com.intellij.openapi.ui.DialogWrapper;
import com.intellij.openapi.util.Disposer;
import javax.swing.*;
import java.awt.*;
/**
* @author Dmitry Avdeev
*/
public class EditLibraryDialog extends DialogWrapper {
private JPanel myEditorPanel;
private JPanel myPanel;
private JPanel myNameAndLevelPanelWrapper;
private final LibraryNameAndLevelPanel myNameAndLevelPanel;
private LibraryCompositionSettings mySettings;
private LibraryTableEditor myLibraryTableEditor;
public EditLibraryDialog(Component parent, LibraryCompositionSettings settings) {
super(parent, true);
mySettings = settings;
final Library library = settings.getOrCreateLibrary();
myLibraryTableEditor = LibraryTableEditor.editLibrary(new LibraryTableModifiableModelProvider() {
@Override
public LibraryTable.ModifiableModel getModifiableModel() {
return library.getTable().getModifiableModel();
}
@Override
public String getTableLevel() {
return library.getTable().getTableLevel();
}
@Override
public LibraryTablePresentation getLibraryTablePresentation() {
return library.getTable().getPresentation();
}
@Override
public boolean isLibraryTableEditable() {
return false;
}
}, library);
Disposer.register(getDisposable(), myLibraryTableEditor);
setTitle("Edit Library");
myNameAndLevelPanel = new LibraryNameAndLevelPanel();
myNameAndLevelPanel.reset(mySettings);
init();
}
@Override
protected JComponent createCenterPanel() {
JComponent editor = myLibraryTableEditor.getComponent();
myEditorPanel.add(editor);
myNameAndLevelPanelWrapper.add(myNameAndLevelPanel.getPanel());
return myPanel;
}
@Override
protected void doOKAction() {
myNameAndLevelPanel.apply(mySettings);
super.doOKAction();
}
}
@@ -33,7 +33,6 @@ import com.intellij.openapi.util.io.FileUtil;
import com.intellij.openapi.vfs.LocalFileSystem;
import com.intellij.openapi.vfs.VfsUtil;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.ui.IdeBorderFactory;
import com.intellij.util.containers.ContainerUtil;
import com.intellij.util.ui.UIUtil;
import org.jetbrains.annotations.NotNull;
@@ -74,18 +73,18 @@ public class LibraryCompositionOptionsPanel {
private final LibraryDownloadingMirrorsMap myMirrorsMap;
private List<RemoteRepositoryMirrorPanel> myMirrorPanelsList;
public LibraryCompositionOptionsPanel(final @NotNull LibrariesContainer librariesContainer, final @NotNull LibraryCompositionSettings libraryCompositionSettings,
public LibraryCompositionOptionsPanel(final @NotNull LibrariesContainer librariesContainer,
final @NotNull LibraryCompositionSettings libraryCompositionSettings,
final @NotNull LibraryDownloadingMirrorsMap mirrorsMap) {
myLibrariesContainer = librariesContainer;
myLibraryCompositionSettings = libraryCompositionSettings;
myMirrorsMap = mirrorsMap;
addMirrorsPanels();
myMainPanel.setBorder(BorderFactory.createCompoundBorder(IdeBorderFactory.createTitledBorder(libraryCompositionSettings.getTitle()), IdeBorderFactory.createEmptyBorder(5,5,5,5)));
myDirectoryField.addBrowseFolderListener(ProjectBundle.message("file.chooser.directory.for.downloaded.libraries.title"),
ProjectBundle.message("file.chooser.directory.for.downloaded.libraries.description"), null,
FileChooserDescriptorFactory.createSingleFolderDescriptor());
myAddedJars.addAll(myLibraryCompositionSettings.getAddedJars());
myUsedLibraries.addAll(myLibraryCompositionSettings.getUsedLibraries());
myAddJarsButton.addActionListener(new ActionListener() {
public void actionPerformed(final ActionEvent e) {
@@ -245,7 +244,6 @@ public class LibraryCompositionOptionsPanel {
myLibraryCompositionSettings.setDownloadLibraries(false);
}
myLibraryCompositionSettings.setUsedLibraries(myUsedLibraries);
myLibraryCompositionSettings.setAddedJars(myAddedJars);
myLibraryCompositionSettings.setLibraryLevel(myLibraryLevels.getKey((String)myLibraryLevelComboBox.getSelectedItem()));
myLibraryCompositionSettings.setLibraryName(myLibraryNameField.getText());
}
@@ -17,11 +17,15 @@ package com.intellij.facet.impl.ui.libraries;
import com.intellij.facet.ui.libraries.LibraryDownloadInfo;
import com.intellij.facet.ui.libraries.LibraryInfo;
import com.intellij.openapi.Disposable;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.roots.ModifiableRootModel;
import com.intellij.openapi.roots.OrderRootType;
import com.intellij.openapi.roots.impl.libraries.ApplicationLibraryTable;
import com.intellij.openapi.roots.libraries.Library;
import com.intellij.openapi.roots.ui.configuration.projectRoot.LibrariesContainer;
import com.intellij.openapi.roots.ui.configuration.projectRoot.LibrariesContainerFactory;
import com.intellij.openapi.util.Disposer;
import com.intellij.openapi.vfs.VfsUtil;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.util.containers.ContainerUtil;
@@ -35,18 +39,21 @@ import java.util.*;
/**
* @author nik
*/
public class LibraryCompositionSettings {
public class LibraryCompositionSettings implements Disposable {
@NonNls private static final String DEFAULT_LIB_FOLDER = "lib";
private final LibraryInfo[] myLibraryInfos;
private final String myBaseDirectoryForDownloadedFiles;
private final String myTitle;
private String myDirectoryForDownloadedLibrariesPath;
private final Set<VirtualFile> myAddedJars = new LinkedHashSet<VirtualFile>();
private boolean myDownloadLibraries = true;
private final Set<Library> myUsedLibraries = new LinkedHashSet<Library>();
private LibrariesContainer.LibraryLevel myLibraryLevel = LibrariesContainer.LibraryLevel.PROJECT;
private String myLibraryName;
private final Icon myIcon;
private boolean myDownloadSources = true;
private boolean myDownloadJavadocs = true;
private Library myLibrary;
public LibraryCompositionSettings(final @NotNull LibraryInfo[] libraryInfos,
final @NotNull String defaultLibraryName,
@@ -73,15 +80,6 @@ public class LibraryCompositionSettings {
myDirectoryForDownloadedLibrariesPath = directoryForDownloadedLibrariesPath;
}
public Set<VirtualFile> getAddedJars() {
return myAddedJars;
}
public void setAddedJars(final Collection<VirtualFile> addedJars) {
myAddedJars.clear();
myAddedJars.addAll(addedJars);
}
public boolean isDownloadLibraries() {
return myDownloadLibraries;
}
@@ -114,13 +112,13 @@ public class LibraryCompositionSettings {
return myTitle;
}
public boolean downloadFiles(final @NotNull LibraryDownloadingMirrorsMap mirrorsMap, @NotNull LibrariesContainer librariesContainer, final @NotNull JComponent parent,
public boolean downloadFiles(final @NotNull LibraryDownloadingMirrorsMap mirrorsMap,
@NotNull LibrariesContainer librariesContainer, final @NotNull JComponent parent,
boolean all) {
if (myDownloadLibraries) {
RequiredLibrariesInfo requiredLibraries = new RequiredLibrariesInfo(getLibraryInfos());
List<VirtualFile> roots = new ArrayList<VirtualFile>();
roots.addAll(myAddedJars);
for (Library library : myUsedLibraries) {
ContainerUtil.addAll(roots, librariesContainer.getLibraryFiles(library, OrderRootType.CLASSES));
}
@@ -136,7 +134,6 @@ public class LibraryCompositionSettings {
if (files.length != downloadingInfos.length) {
return false;
}
ContainerUtil.addAll(myAddedJars, files);
}
}
}
@@ -145,8 +142,8 @@ public class LibraryCompositionSettings {
@Nullable
private Library createLibrary(final ModifiableRootModel rootModel, @Nullable LibrariesContainer additionalContainer) {
if (!myAddedJars.isEmpty()) {
VirtualFile[] roots = VfsUtil.toVirtualFileArray(myAddedJars);
if (myLibrary != null) {
VirtualFile[] roots = myLibrary.getFiles(OrderRootType.CLASSES);
return LibrariesContainerFactory.createLibrary(additionalContainer, LibrariesContainerFactory.createContainer(rootModel),
myLibraryName, myLibraryLevel, roots, VirtualFile.EMPTY_ARRAY);
}
@@ -169,14 +166,10 @@ public class LibraryCompositionSettings {
return myIcon;
}
@Nullable
public Library addLibraries(final ModifiableRootModel rootModel, final List<Library> addedLibraries) {
return addLibraries(rootModel, addedLibraries, null);
}
@Nullable
public Library addLibraries(final @NotNull ModifiableRootModel rootModel, final @NotNull List<Library> addedLibraries,
final @Nullable LibrariesContainer librariesContainer) {
Library library = createLibrary(rootModel, librariesContainer);
if (library != null) {
@@ -191,4 +184,43 @@ public class LibraryCompositionSettings {
}
return library;
}
public boolean isDownloadSources() {
return myDownloadSources;
}
public void setDownloadSources(boolean downloadSources) {
myDownloadSources = downloadSources;
}
public boolean isDownloadJavadocs() {
return myDownloadJavadocs;
}
public void setDownloadJavadocs(boolean downloadJavadocs) {
myDownloadJavadocs = downloadJavadocs;
}
@Nullable
public Library getLibrary() {
return myLibrary;
}
@NotNull
public Library getOrCreateLibrary() {
if (myLibrary == null) {
ApplicationManager.getApplication().runWriteAction(new Runnable() {
@Override
public void run() {
myLibrary = new ApplicationLibraryTable().createLibrary();
Disposer.register(LibraryCompositionSettings.this, myLibrary);
}
});
}
return myLibrary;
}
@Override
public void dispose() {
}
}
@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="com.intellij.facet.impl.ui.libraries.LibraryNameAndLevelPanel">
<grid id="27dc6" binding="myPanel" layout-manager="GridLayoutManager" row-count="2" column-count="5" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<xy x="20" y="20" width="500" height="72"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<component id="da42c" class="javax.swing.JLabel">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<labelFor value="a38e9"/>
<text value="&amp;Name:"/>
</properties>
</component>
<vspacer id="82a6e">
<constraints>
<grid row="1" column="0" 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="a38e9" class="javax.swing.JTextField" binding="myLibraryNameField">
<constraints>
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="0" indent="0" use-parent-layout="false">
<preferred-size width="150" height="-1"/>
</grid>
</constraints>
<properties/>
</component>
<component id="2bb99" class="javax.swing.JLabel">
<constraints>
<grid row="0" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<labelFor value="7ac04"/>
<text value="&amp;Level"/>
</properties>
</component>
<hspacer id="107f7">
<constraints>
<grid row="0" column="4" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
</hspacer>
<component id="7ac04" class="javax.swing.JComboBox" binding="myLevelComboBox">
<constraints>
<grid row="0" column="3" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
</component>
</children>
</grid>
</form>
@@ -0,0 +1,46 @@
/*
* Copyright 2000-2010 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.facet.impl.ui.libraries;
import com.intellij.openapi.roots.ui.configuration.projectRoot.LibrariesContainer;
import com.intellij.ui.EnumComboBoxModel;
import javax.swing.*;
/**
* @author Dmitry Avdeev
*/
class LibraryNameAndLevelPanel {
private JTextField myLibraryNameField;
private JComboBox myLevelComboBox;
private JPanel myPanel;
void reset(LibraryCompositionSettings settings) {
myLibraryNameField.setText(settings.getLibraryName());
myLevelComboBox.setModel(new EnumComboBoxModel<LibrariesContainer.LibraryLevel>(LibrariesContainer.LibraryLevel.class));
myLevelComboBox.setSelectedItem(settings.getLibraryLevel());
}
void apply(LibraryCompositionSettings settings) {
settings.setLibraryName(myLibraryNameField.getText());
settings.setLibraryLevel((LibrariesContainer.LibraryLevel)myLevelComboBox.getSelectedItem());
}
public JPanel getPanel() {
return myPanel;
}
}
@@ -0,0 +1,109 @@
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="com.intellij.facet.impl.ui.libraries.LibraryOptionsPanel">
<grid id="27dc6" binding="myPanel" layout-manager="GridLayoutManager" row-count="5" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<xy x="20" y="20" width="584" height="261"/>
</constraints>
<properties>
<enabled value="false"/>
</properties>
<border type="none"/>
<children>
<component id="a5b73" class="javax.swing.JRadioButton">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false">
<preferred-size width="207" height="22"/>
</grid>
</constraints>
<properties>
<selected value="true"/>
<text value="Download from &amp;Maven repository"/>
</properties>
</component>
<component id="f63e3" class="javax.swing.JRadioButton">
<constraints>
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false">
<preferred-size width="207" height="22"/>
</grid>
</constraints>
<properties>
<text value="Do &amp;not create new library"/>
</properties>
</component>
<component id="46359" class="javax.swing.JRadioButton">
<constraints>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Pick up files from &amp;disk"/>
</properties>
</component>
<grid id="4f3d8" layout-manager="GridLayoutManager" row-count="1" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="4" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<component id="37d09" class="javax.swing.JLabel" binding="myMessage">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="7" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<enabled value="false"/>
<text value="&lt;html&gt;{} jars will be downloaded into &lt;b&gt;lib&lt;/b&gt; directory&lt;br&gt; Project level library &lt;b&gt;spring&lt;/b&gt; will be created&lt;/html&gt;"/>
</properties>
</component>
<hspacer id="2f96b">
<constraints>
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
</hspacer>
<component id="6cdd8" class="javax.swing.JButton" binding="myConfigureButton" default-binding="true">
<constraints>
<grid row="0" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="2" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="&amp;Configure..."/>
</properties>
</component>
</children>
</grid>
<grid id="20f07" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="5" left="0" bottom="0" right="0"/>
<constraints>
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="7" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<component id="6efe3" class="javax.swing.JLabel" binding="myExistingLibrariesLabel">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Use suitable e&amp;xisting libraries:"/>
</properties>
</component>
<grid id="d793e" binding="myExistingLibrariesPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
<children/>
</grid>
</children>
</grid>
</children>
</grid>
<buttonGroups>
<group name="myButtonGroup" bound="true">
<member id="a5b73"/>
<member id="46359"/>
<member id="f63e3"/>
</group>
</buttonGroups>
</form>
@@ -0,0 +1,223 @@
/*
* Copyright 2000-2010 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.facet.impl.ui.libraries;
import com.intellij.facet.ui.libraries.LibraryInfo;
import com.intellij.ide.IdeBundle;
import com.intellij.ide.util.ElementsChooser;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.fileChooser.FileChooser;
import com.intellij.openapi.fileChooser.FileChooserDescriptor;
import com.intellij.openapi.roots.OrderRootType;
import com.intellij.openapi.roots.libraries.Library;
import com.intellij.openapi.roots.ui.configuration.projectRoot.LibrariesContainer;
import com.intellij.openapi.ui.DialogWrapper;
import com.intellij.openapi.util.Computable;
import com.intellij.openapi.vfs.LocalFileSystem;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.util.ui.RadioButtonEnumModel;
import org.jetbrains.annotations.Nullable;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.List;
/**
* @author Dmitry Avdeev
*/
public class LibraryOptionsPanel {
private JLabel myMessage;
private JPanel myPanel;
private JButton myConfigureButton;
private JPanel myExistingLibrariesPanel;
private JLabel myExistingLibrariesLabel;
private ButtonGroup myButtonGroup;
private ElementsChooser<Library> myLibrariesChooser;
private LibraryCompositionSettings mySettings;
private LibrariesContainer myLibrariesContainer;
private enum Choice {
DOWNLOAD,
PICK_FILES,
DO_NOT_CREATE
}
private RadioButtonEnumModel<Choice> myButtonEnumModel;
public LibraryOptionsPanel(LibraryCompositionSettings settings, LibrariesContainer librariesContainer) {
mySettings = settings;
myLibrariesContainer = librariesContainer;
List<Library> suitableLibraries = calculateSuitableLibraries();
if (!suitableLibraries.isEmpty()) {
mySettings.setUsedLibraries(suitableLibraries);
}
myLibrariesChooser = new ChooseLibrariesDialog.LibraryElementChooser(suitableLibraries);
myLibrariesChooser.getComponents()[0].setPreferredSize(new Dimension(10, 10)); // this makes scrollbars to work
myExistingLibrariesPanel.add(myLibrariesChooser);
myExistingLibrariesLabel.setLabelFor(myLibrariesChooser.getComponent());
myButtonEnumModel = RadioButtonEnumModel.bindEnum(Choice.class, myButtonGroup);
myButtonEnumModel.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
updateState();
}
});
myConfigureButton.addActionListener(new ActionListener() {
public void actionPerformed(final ActionEvent e) {
switch (myButtonEnumModel.getSelected()) {
case DOWNLOAD:
showDialog(new DownloadingOptionsDialog(myConfigureButton, mySettings));
break;
case PICK_FILES:
if (mySettings.getLibrary() == null) {
VirtualFile[] files = showFileChooser();
final Library.ModifiableModel modifiableModel = mySettings.getOrCreateLibrary().getModifiableModel();
for (VirtualFile file : files) {
modifiableModel.addRoot(file, OrderRootType.CLASSES);
}
ApplicationManager.getApplication().runWriteAction(new Runnable() {
@Override
public void run() {
modifiableModel.commit();
}
});
}
EditLibraryDialog dialog = new EditLibraryDialog(myConfigureButton, mySettings);
showDialog(dialog);
break;
case DO_NOT_CREATE:
break;
}
updateState();
}
});
updateState();
}
private void showDialog(final DialogWrapper dialog) {
dialog.setInitialLocationCallback(new Computable<Point>() {
@Override
public Point compute() {
Point point = myConfigureButton.getLocationOnScreen();
point.translate(- 50, - dialog.getSize().height - 20);
return point;
}
});
dialog.show();
}
private List<Library> calculateSuitableLibraries() {
LibraryInfo[] libraryInfos = mySettings.getLibraryInfos();
RequiredLibrariesInfo requiredLibraries = new RequiredLibrariesInfo(libraryInfos);
List<Library> suitableLibraries = new ArrayList<Library>();
Library[] libraries = myLibrariesContainer.getAllLibraries();
for (Library library : libraries) {
RequiredLibrariesInfo.RequiredClassesNotFoundInfo info =
requiredLibraries.checkLibraries(myLibrariesContainer.getLibraryFiles(library, OrderRootType.CLASSES), false);
if (info == null || info.getLibraryInfos().length < libraryInfos.length) {
suitableLibraries.add(library);
}
}
return suitableLibraries;
}
private VirtualFile[] showFileChooser() {
final FileChooserDescriptor descriptor = new FileChooserDescriptor(false, false, true, false, false, true);
descriptor.setTitle(IdeBundle.message("file.chooser.select.paths.title"));
descriptor.setDescription(IdeBundle.message("file.chooser.multiselect.description"));
return FileChooser.chooseFiles(myConfigureButton, descriptor, getBaseDirectory());
}
@Nullable
private VirtualFile getBaseDirectory() {
String path = mySettings.getBaseDirectoryForDownloadedFiles();
VirtualFile dir = LocalFileSystem.getInstance().findFileByPath(path);
if (dir == null) {
path = path.substring(0, path.lastIndexOf('/'));
dir = LocalFileSystem.getInstance().findFileByPath(path);
}
return dir;
}
private void updateState() {
if (myMessage.isEnabled()) {
myMessage.setForeground(Color.black);
}
myConfigureButton.setEnabled(true);
String message = "";
switch (myButtonEnumModel.getSelected()) {
case DOWNLOAD:
String path = mySettings.getDirectoryForDownloadedLibrariesPath()
.substring(mySettings.getBaseDirectoryForDownloadedFiles().length());
message = MessageFormat.format("{0} jar(s) will be downloaded into <b>{1}</b> directory <br>" +
"{2} library <b>{3}</b> will be created",
mySettings.getLibraryInfos().length,
path,
mySettings.getLibraryLevel(),
mySettings.getLibraryName());
break;
case PICK_FILES:
Library library = mySettings.getLibrary();
if (library == null) {
myMessage.setForeground(Color.red);
message = "Press Configure button to add classes to the library";
}
else {
message = MessageFormat.format("{0} level library <b>{1}</b>" +
" with {2} file(s) will be created",
mySettings.getLibraryLevel(),
mySettings.getLibraryName(),
library.getFiles(OrderRootType.CLASSES).length);
}
break;
case DO_NOT_CREATE:
message = "No new library will be created";
myConfigureButton.setEnabled(false);
break;
}
myMessage.setText("<html>" + message + "</html>");
}
public LibraryCompositionSettings getSettings() {
return mySettings;
}
public void apply() {
mySettings.setUsedLibraries(myLibrariesChooser.getMarkedElements());
mySettings.setDownloadLibraries(myButtonEnumModel.getSelected() == Choice.DOWNLOAD);
}
public JComponent getMainPanel() {
return myPanel;
}
}
@@ -40,7 +40,15 @@ public class AddFrameworkSupportDialog extends DialogWrapper {
public String compute() {
return contentRootPath;
}
});
}) {
@Override
protected void onFrameworkStateChanged() {
setOKActionEnabled(isOKActionEnabled());
}
};
setOKActionEnabled(isOKActionEnabled());
Disposer.register(myDisposable, myAddSupportPanel);
init();
}
@@ -61,8 +69,13 @@ public class AddFrameworkSupportDialog extends DialogWrapper {
return roots.length != 0 && FrameworkSupportUtil.hasProviders(module);
}
@Override
public boolean isOKActionEnabled() {
return myAddSupportPanel.hasSelectedFrameworks();
}
protected void doOKAction() {
if (myAddSupportPanel.haveSelectedFrameworks()) {
if (myAddSupportPanel.hasSelectedFrameworks()) {
if (!myAddSupportPanel.downloadLibraries()) {
int answer = Messages.showYesNoDialog(myAddSupportPanel.getMainPanel(),
ProjectBundle.message("warning.message.some.required.libraries.wasn.t.downloaded"),
@@ -96,4 +109,9 @@ public class AddFrameworkSupportDialog extends DialogWrapper {
protected JComponent createCenterPanel() {
return myAddSupportPanel.getMainPanel();
}
@Override
public JComponent getPreferredFocusedComponent() {
return myAddSupportPanel.getFrameworksTree();
}
}
@@ -31,7 +31,9 @@
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none"/>
<border type="empty">
<size top="3" left="0" bottom="0" right="0"/>
</border>
<children/>
</grid>
</children>
@@ -16,9 +16,9 @@
package com.intellij.ide.util.newProjectWizard;
import com.intellij.facet.impl.ui.libraries.LibraryCompositionOptionsPanel;
import com.intellij.facet.impl.ui.libraries.LibraryCompositionSettings;
import com.intellij.facet.impl.ui.libraries.LibraryDownloadingMirrorsMap;
import com.intellij.facet.impl.ui.libraries.LibraryOptionsPanel;
import com.intellij.facet.ui.FacetBasedFrameworkSupportProvider;
import com.intellij.facet.ui.libraries.LibraryDownloadInfo;
import com.intellij.facet.ui.libraries.LibraryInfo;
@@ -48,6 +48,7 @@ import com.intellij.ui.SeparatorFactory;
import com.intellij.util.graph.CachingSemiGraph;
import com.intellij.util.graph.DFSTBuilder;
import com.intellij.util.graph.GraphGenerator;
import com.intellij.util.ui.UIUtil;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -64,7 +65,6 @@ import java.util.List;
*/
public class AddSupportForFrameworksPanel implements Disposable {
private static final Logger LOG = Logger.getInstance("#com.intellij.ide.util.newProjectWizard.AddSupportForFrameworksStep");
@NonNls private static final String UNCHECKED_CARD = "unchecked";
@NonNls private static final String EMPTY_CARD = "empty";
private JPanel myMainPanel;
private JPanel myFrameworksPanel;
@@ -78,7 +78,6 @@ public class AddSupportForFrameworksPanel implements Disposable {
private final FrameworksTree myFrameworksTree;
private final Set<String> myInitializedOptionsPanelIds = new HashSet<String>();
private FrameworkSupportNode myLastSelectedNode;
private final JLabel myTickCheckboxLabel;
public AddSupportForFrameworksPanel(final List<FrameworkSupportProvider> providers, final @NotNull LibrariesContainer librariesContainer,
@Nullable ModuleBuilder builder, Computable<String> baseDirForLibrariesGetter) {
@@ -100,6 +99,7 @@ public class AddSupportForFrameworksPanel implements Disposable {
updateOptionsPanel();
frameworkSupportNode.getConfigurable().onFrameworkSelectionChanged(node.isChecked());
myModel.onFrameworkSelectionChanged(frameworkSupportNode);
onFrameworkStateChanged();
}
};
myFrameworksTree.addTreeSelectionListener(new TreeSelectionListener() {
@@ -107,17 +107,19 @@ public class AddSupportForFrameworksPanel implements Disposable {
onSelectionChanged();
}
});
splitter.setFirstComponent(ScrollPaneFactory.createScrollPane(myFrameworksTree));
myOptionsPanel = new JPanel(new CardLayout());
myOptionsPanel.add(EMPTY_CARD, new JPanel());
final JPanel uncheckedLabelPanel = new JPanel(new BorderLayout());
myTickCheckboxLabel = new JLabel("Tick checkbox");
uncheckedLabelPanel.add(BorderLayout.NORTH, myTickCheckboxLabel);
myOptionsPanel.add(UNCHECKED_CARD, uncheckedLabelPanel);
splitter.setSecondComponent(myOptionsPanel);
myFrameworksPanel.add(splitter, BorderLayout.CENTER);
myFrameworksTree.setSelectionRow(0);
}
protected void onFrameworkStateChanged() {}
private void onSelectionChanged() {
if (!myFrameworksTree.isProcessingMouseEventOnCheckbox()) {
updateOptionsPanel();
@@ -129,10 +131,7 @@ public class AddSupportForFrameworksPanel implements Disposable {
myLastSelectedNode = selectedNode;
if (selectedNode != null) {
final LibraryCompositionOptionsPanel newOptionsPanel = selectedNode.getLibraryCompositionOptionsPanel(myLibrariesContainer, myMirrorsMap);
if (newOptionsPanel != null) {
newOptionsPanel.updateRepositoriesMirrors(myMirrorsMap);
}
selectedNode.getLibraryCompositionOptionsPanel(myLibrariesContainer, myMirrorsMap);
}
}
}
@@ -143,9 +142,8 @@ public class AddSupportForFrameworksPanel implements Disposable {
private void applyLibraryOptionsForSelected() {
if (myLastSelectedNode != null) {
final LibraryCompositionOptionsPanel optionsPanel = myLastSelectedNode.getLibraryCompositionOptionsPanel(myLibrariesContainer, myMirrorsMap);
final LibraryOptionsPanel optionsPanel = myLastSelectedNode.getLibraryCompositionOptionsPanel(myLibrariesContainer, myMirrorsMap);
if (optionsPanel != null) {
optionsPanel.saveSelectedRepositoriesMirrors(myMirrorsMap);
optionsPanel.apply();
}
}
@@ -154,14 +152,9 @@ public class AddSupportForFrameworksPanel implements Disposable {
private void updateOptionsPanel() {
final FrameworkSupportNode node = getSelectedNode();
if (node != null) {
if (node.isChecked()) {
initializeOptionsPanel(node);
showCard(node.getProvider().getId());
}
else {
myTickCheckboxLabel.setText("Select check box to add '" + node.getTitle() + "' support");
showCard(UNCHECKED_CARD);
}
initializeOptionsPanel(node);
showCard(node.getProvider().getId());
UIUtil.setEnabled(myOptionsPanel, node.isChecked(), true);
}
else {
showCard(EMPTY_CARD);
@@ -177,13 +170,17 @@ public class AddSupportForFrameworksPanel implements Disposable {
private void initializeOptionsPanel(final FrameworkSupportNode node) {
final String id = node.getProvider().getId();
if (!myInitializedOptionsPanelIds.contains(id)) {
final JPanel optionsPanel = new JPanel(new VerticalFlowLayout());
VerticalFlowLayout layout = new VerticalFlowLayout();
layout.setVerticalFill(true);
final JPanel optionsPanel = new JPanel(layout);
JComponent separator = SeparatorFactory.createSeparator(node.getTitle() + " Settings", null);
separator.setBorder(IdeBorderFactory.createEmptyBorder(0, 0, 5, 5));
optionsPanel.add(separator);
final FrameworkSupportConfigurable configurable = node.getConfigurable();
optionsPanel.add(configurable.getComponent());
final JPanel librariesOptionsPanelWrapper = new JPanel(new BorderLayout());
optionsPanel.add(librariesOptionsPanelWrapper);
configurable.addListener(new FrameworkSupportConfigurableListener() {
@@ -200,8 +197,11 @@ public class AddSupportForFrameworksPanel implements Disposable {
}
private void addLibrariesOptionsPanel(FrameworkSupportNode node, JPanel librariesOptionsPanelWrapper) {
final LibraryCompositionOptionsPanel libraryOptionsPanel = node.getLibraryCompositionOptionsPanel(myLibrariesContainer, myMirrorsMap);
final LibraryOptionsPanel libraryOptionsPanel = node.getLibraryCompositionOptionsPanel(myLibrariesContainer, myMirrorsMap);
if (libraryOptionsPanel != null) {
JComponent separator = SeparatorFactory.createSeparator("Libraries", null);
separator.setBorder(IdeBorderFactory.createEmptyBorder(5, 0, 5, 5));
librariesOptionsPanelWrapper.add(BorderLayout.NORTH, separator);
librariesOptionsPanelWrapper.add(BorderLayout.CENTER, libraryOptionsPanel.getMainPanel());
}
}
@@ -314,7 +314,11 @@ public class AddSupportForFrameworksPanel implements Disposable {
return myMainPanel;
}
public boolean haveSelectedFrameworks() {
public FrameworksTree getFrameworksTree() {
return myFrameworksTree;
}
public boolean hasSelectedFrameworks() {
return !getFrameworkNodes(true).isEmpty();
}
@@ -347,7 +351,7 @@ public class AddSupportForFrameworksPanel implements Disposable {
FrameworkSupportConfigurable configurable = node.getConfigurable();
selectedConfigurables.add(configurable);
final LibraryCompositionSettings settings = node.getLibraryCompositionSettings();
Library library = settings != null ? settings.addLibraries(rootModel, addedLibraries) : null;
Library library = settings != null ? settings.addLibraries(rootModel, addedLibraries, null) : null;
configurable.addSupport(module, rootModel, library);
}
for (FrameworkSupportNode node : selectedFrameworks) {
@@ -15,9 +15,9 @@
*/
package com.intellij.ide.util.newProjectWizard;
import com.intellij.facet.impl.ui.libraries.LibraryCompositionOptionsPanel;
import com.intellij.facet.impl.ui.libraries.LibraryCompositionSettings;
import com.intellij.facet.impl.ui.libraries.LibraryDownloadingMirrorsMap;
import com.intellij.facet.impl.ui.libraries.LibraryOptionsPanel;
import com.intellij.facet.ui.libraries.LibraryInfo;
import com.intellij.ide.util.frameworkSupport.FrameworkSupportConfigurable;
import com.intellij.ide.util.frameworkSupport.FrameworkSupportProvider;
@@ -50,7 +50,7 @@ public class FrameworkSupportNode extends CheckedTreeNode {
private final List<FrameworkSupportNode> myChildren = new ArrayList<FrameworkSupportNode>();
private LibraryCompositionSettings myLibraryCompositionSettings;
private final Computable<String> myBaseDirForLibrariesGetter;
private LibraryCompositionOptionsPanel myLibraryCompositionOptionsPanel;
private LibraryOptionsPanel myLibraryCompositionOptionsPanel;
public FrameworkSupportNode(final FrameworkSupportProvider provider, final FrameworkSupportNode parentNode, final FrameworkSupportModelImpl model,
Computable<String> baseDirForLibrariesGetter, Disposable parentDisposable) {
@@ -75,12 +75,12 @@ public class FrameworkSupportNode extends CheckedTreeNode {
}
@Nullable
public LibraryCompositionOptionsPanel getLibraryCompositionOptionsPanel(LibrariesContainer librariesContainer,
public LibraryOptionsPanel getLibraryCompositionOptionsPanel(LibrariesContainer librariesContainer,
LibraryDownloadingMirrorsMap mirrorsMap) {
final LibraryCompositionSettings libraryCompositionSettings = getLibraryCompositionSettings();
if (myLibraryCompositionOptionsPanel == null || !myLibraryCompositionOptionsPanel.getLibraryCompositionSettings().equals(libraryCompositionSettings)) {
if (myLibraryCompositionOptionsPanel == null || !myLibraryCompositionOptionsPanel.getSettings().equals(libraryCompositionSettings)) {
if (libraryCompositionSettings != null) {
myLibraryCompositionOptionsPanel = new LibraryCompositionOptionsPanel(librariesContainer, libraryCompositionSettings, mirrorsMap);
myLibraryCompositionOptionsPanel = new LibraryOptionsPanel(libraryCompositionSettings, librariesContainer);
}
else {
myLibraryCompositionOptionsPanel = null;
@@ -126,6 +126,7 @@ public class FrameworkSupportNode extends CheckedTreeNode {
if (libraries.length != 0) {
myLibraryCompositionSettings = new LibraryCompositionSettings(libraries, myConfigurable.getSelectedVersion().getLibraryName(), myBaseDirForLibrariesGetter.compute(),
"Libraries", myProvider.getIcon());
Disposer.register(myConfigurable, myLibraryCompositionSettings);
}
else {
myLibraryCompositionSettings = null;
@@ -151,42 +151,19 @@ public class ModulesConfigurator implements ModulesProvider, ModuleEditor.Change
}
public ModuleRootModel getRootModel(@NotNull Module module) {
return getEditor(module).getRootModel();
return getOrCreateModuleEditor(module).getRootModel();
}
public ModuleEditor getEditor(Module module) {
public ModuleEditor getOrCreateModuleEditor(Module module) {
LOG.assertTrue(getModule(module.getName()) != null, "Module has been deleted");
ModuleEditor editor = getModuleEditor(module);
if (editor == null) {
editor = createModuleEditor(module);
editor = doCreateModuleEditor(module);
}
return editor;
}
public FacetModel getFacetModel(@NotNull Module module) {
return myFacetsConfigurator.getOrCreateModifiableModel(module);
}
public void resetModuleEditors() {
myModuleModel = ModuleManager.getInstance(myProject).getModifiableModel();
ApplicationManager.getApplication().runWriteAction(new Runnable() {
public void run() {
assert myModuleEditors.isEmpty();
final Module[] modules = myModuleModel.getModules();
if (modules.length > 0) {
for (Module module : modules) {
createModuleEditor(module);
}
Collections.sort(myModuleEditors, myModuleEditorComparator);
}
}
});
myFacetsConfigurator.resetEditors();
myModified = false;
}
public ModuleEditor createModuleEditor(final Module module) {
private ModuleEditor doCreateModuleEditor(final Module module) {
final ModuleEditor moduleEditor = new ModuleEditor(myProject, this, module) {
@Override
public ProjectFacetsConfigurator getFacetsConfigurator() {
@@ -208,6 +185,29 @@ public class ModulesConfigurator implements ModulesProvider, ModuleEditor.Change
return moduleEditor;
}
public FacetModel getFacetModel(@NotNull Module module) {
return myFacetsConfigurator.getOrCreateModifiableModel(module);
}
public void resetModuleEditors() {
myModuleModel = ModuleManager.getInstance(myProject).getModifiableModel();
ApplicationManager.getApplication().runWriteAction(new Runnable() {
public void run() {
assert myModuleEditors.isEmpty();
final Module[] modules = myModuleModel.getModules();
if (modules.length > 0) {
for (Module module : modules) {
getOrCreateModuleEditor(module);
}
Collections.sort(myModuleEditors, myModuleEditorComparator);
}
}
});
myFacetsConfigurator.resetEditors();
myModified = false;
}
public void moduleStateChanged(final ModifiableRootModel moduleRootModel) {
myProjectConfigurable.updateCircularDependencyWarning();
for (ModuleEditor.ChangeListener listener : myAllModulesChangeListeners) {
@@ -368,7 +368,7 @@ public class ModulesConfigurator implements ModulesProvider, ModuleEditor.Change
ApplicationManager.getApplication().runWriteAction(new Runnable() {
public void run() {
for (Module module : modules) {
createModuleEditor(module);
getOrCreateModuleEditor(module);
}
}
});
@@ -404,7 +404,7 @@ public class ModulesConfigurator implements ModulesProvider, ModuleEditor.Change
if (module != null) {
ApplicationManager.getApplication().runWriteAction(new Runnable() {
public void run() {
createModuleEditor(module);
getOrCreateModuleEditor(module);
Collections.sort(myModuleEditors, myModuleEditorComparator);
}
});
@@ -252,7 +252,7 @@ public class ArtifactsStructureConfigurableContextImpl implements ArtifactsStruc
}
public ModifiableRootModel getOrCreateModifiableRootModel(Module module) {
final ModuleEditor editor = myContext.getModulesConfigurator().getEditor(module);
final ModuleEditor editor = myContext.getModulesConfigurator().getOrCreateModuleEditor(module);
return editor.getModifiableRootModelProxy();
}
}
@@ -18,6 +18,7 @@ package com.intellij.openapi.roots.ui.configuration.projectRoot;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.roots.OrderRootType;
import com.intellij.openapi.roots.libraries.Library;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.openapi.vfs.VirtualFile;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
@@ -31,7 +32,12 @@ public interface LibrariesContainer {
@Nullable
Project getProject();
enum LibraryLevel {GLOBAL, PROJECT, MODULE}
enum LibraryLevel {GLOBAL, PROJECT, MODULE;
public String toString() {
return StringUtil.capitalize(name().toLowerCase());
}
}
@NotNull
Library[] getLibraries(@NotNull LibraryLevel libraryLevel);
@@ -29,22 +29,8 @@ public class ColorUtil {
private ColorUtil() {
}
public static String toHex(@NotNull final Color color) {
final StringBuffer sb = new StringBuffer();
for (int i = 0; i < 3; i++) {
String s = Integer.toHexString(i == 0 ? color.getRed() : i == 1 ? color.getGreen() : color.getBlue());
if (s.length() < 2) {
sb.append('0');
}
sb.append(s);
}
return sb.toString();
}
public static String generatePreviewHtml(@NotNull final Color color) {
return String.format("<div style=\"width: 50px; height: 30px; background-color: #%s; border: 1px solid #222;\">&nbsp;</div>", toHex(color));
return String.format("<div style=\"width: 50px; height: 30px; background-color: #%s; border: 1px solid #222;\">&nbsp;</div>", com.intellij.ui.ColorUtil.toHex(color));
}
public static void appendColorPreview(final PsiVariable variable, final StringBuilder buffer) {
@@ -32,7 +32,7 @@ import java.io.IOException;
public class JavaImportListElementType extends JavaStubElementType<PsiImportListStub, PsiImportList> {
public JavaImportListElementType() {
super("IMPORT_LIST", true);
super("IMPORT_LIST");
}
public PsiImportList createPsi(final PsiImportListStub stub) {
@@ -88,19 +88,17 @@ public class ParseUtil extends ParseUtilBase {
return treeNext instanceof ModifierListElement;
}
private static void moveEmptyImportList(ASTNode root) {
TreeElement first = (TreeElement)root.getFirstChildNode();
TreeElement next = (TreeElement)TreeUtil.skipElements(first, ElementType.JAVA_COMMENT_OR_WHITESPACE_BIT_SET);
if (next == null) return;
private static final TokenSet BEFORE_IMPORT_BIT_SET = TokenSet.orSet(ElementType.JAVA_COMMENT_OR_WHITESPACE_BIT_SET,
TokenSet.create(JavaElementType.PACKAGE_STATEMENT));
if (next.getElementType() == JavaElementType.PACKAGE_STATEMENT) {
first = next.getTreeNext();
next = (TreeElement)TreeUtil.skipElements(first, ElementType.JAVA_COMMENT_OR_WHITESPACE_BIT_SET);
}
private static void moveEmptyImportList(final ASTNode root) {
final TreeElement anImport = (TreeElement)TreeUtil.skipElements(root.getFirstChildNode(), BEFORE_IMPORT_BIT_SET);
if (anImport == null || !isEmptyImportList(anImport)) return;
if (next != null && next != first && isEmptyImportList(next)) {
next.rawRemove();
first.rawInsertBeforeMe(next);
final TreeElement next = (TreeElement)TreeUtil.skipElements(anImport.getTreeNext(), ElementType.JAVA_COMMENT_OR_WHITESPACE_BIT_SET);
if (next != null && next != anImport) {
anImport.rawRemove();
next.rawInsertBeforeMe(anImport);
}
}
@@ -124,23 +122,28 @@ public class ParseUtil extends ParseUtilBase {
// we'll only bind additional preceding comments in pass 2 when the declaration does not yet have a "doc comment"
iterator = comments.listIterator();
while (iterator.hasNext()) {
ASTNode child = iterator.next();
IElementType type = child.getElementType();
ASTNode comment = iterator.next();
IElementType type = comment.getElementType();
if (type == JavaDocElementType.DOC_COMMENT) {
if (bindDocComment((TreeElement)child)) iterator.remove();
if (bindDocComment((TreeElement)comment)) iterator.remove();
}
// bind "trailing comments" (like "int a; // comment")
else if (type == JavaTokenType.END_OF_LINE_COMMENT || type == JavaTokenType.C_STYLE_COMMENT) {
if (bindTrailingComment((TreeElement)child)) iterator.remove();
if (bindTrailingComment((TreeElement)comment)) iterator.remove();
}
}
// pass 2: bind preceding comments (like "// comment \n void f();")
iterator = comments.listIterator(comments.size());
while (iterator.hasPrevious()) {
ASTNode child = iterator.previous();
TreeElement next = (TreeElement)TreeUtil.skipElements(child.getTreeNext(), ElementType.JAVA_WHITESPACE_BIT_SET);
bindPrecedingComment((TreeElement)child, next);
final ASTNode comment = iterator.previous();
TreeElement next = (TreeElement)TreeUtil.skipElements(comment.getTreeNext(), ElementType.JAVA_WHITESPACE_BIT_SET);
if (next != null && isEmptyImportList(next)) {
next = (TreeElement)TreeUtil.skipElements(next.getTreeNext(), ElementType.JAVA_WHITESPACE_BIT_SET);
}
bindPrecedingComment((TreeElement)comment, next);
}
}
@@ -220,22 +223,22 @@ public class ParseUtil extends ParseUtilBase {
TreeElement child = comment;
while (child != bindTo) {
final TreeElement next = child.getTreeNext();
child.rawRemove();
first.rawInsertBeforeMe(child);
if (!isEmptyImportList(child)) {
child.rawRemove();
first.rawInsertBeforeMe(child);
}
child = next;
}
}
private static boolean isBindingComment(final ASTNode comment) {
ASTNode prev = comment.getTreePrev();
if (isEmptyImportList(prev)) prev = prev.getTreePrev();
final ASTNode prev = comment.getTreePrev();
final boolean prevOk = prev == null ||
(prev.getElementType() == TokenType.WHITE_SPACE && prev.textContains('\n'));
final ASTNode next = comment.getTreeNext();
final boolean nextOk = next != null &&
next.getElementType() == TokenType.WHITE_SPACE &&
StringUtil.getLineBreakCount(next.getText()) < 2;
(next.getElementType() != TokenType.WHITE_SPACE || StringUtil.getLineBreakCount(next.getText()) < 2);
return prevOk && nextOk;
}
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,14 @@
a>>2, a > > 3, a >>> 4
------------------------------
PsiIdentifier:a
PsiJavaToken:GTGT
PsiJavaToken:INTEGER_LITERAL
PsiJavaToken:COMMA
PsiIdentifier:a
PsiJavaToken:GT
PsiJavaToken:GT
PsiJavaToken:INTEGER_LITERAL
PsiJavaToken:COMMA
PsiIdentifier:a
PsiJavaToken:GTGTGT
PsiJavaToken:INTEGER_LITERAL
@@ -0,0 +1,10 @@
a >>>= b ><xyz >>= 3
------------------
PsiIdentifier:a
PsiJavaToken:GTGTGTEQ
PsiIdentifier:b
PsiJavaToken:GT
PsiJavaToken:LT
PsiIdentifier:xyz
PsiJavaToken:GTGTEQ
PsiJavaToken:INTEGER_LITERAL
@@ -0,0 +1,5 @@
import p1.A;
class C {
<caret>I i = null;
}
@@ -0,0 +1,5 @@
import p1.A;
class C {
p2.A i = null;
}
@@ -0,0 +1,5 @@
import p1.A;
class C {
<caret>I i = null;
}
@@ -0,0 +1,5 @@
import p1.A;
class C {
p2.A i = null;
}
@@ -0,0 +1,4 @@
package p1;
class A {
}
@@ -0,0 +1,4 @@
package p2;
class A {
}
@@ -0,0 +1,2 @@
class X<T> {
}
@@ -0,0 +1,2 @@
class X <T extends Runnable & Compareable> {
}
@@ -0,0 +1,2 @@
class X <T extends Runnable & Compareable & Cloneable> {
}
@@ -0,0 +1,2 @@
class X <T extends Runnable & Compareable> {
}
@@ -0,0 +1,2 @@
class X <T extends Cloneable & Runnable & Compareable> {
}
@@ -0,0 +1,2 @@
class X <T extends Runnable & Compareable> {
}
@@ -0,0 +1,2 @@
class X <T extends Runnable & Cloneable & Compareable> {
}
@@ -0,0 +1,2 @@
class X<T extends Runnable> {
}
@@ -0,0 +1,2 @@
public class X<T extends Runnable & Compareable> {
}
@@ -0,0 +1,2 @@
public class X<T extends Runnable> {
}
@@ -0,0 +1,2 @@
public class X<T extends Runnable & Compareable> {
}
@@ -0,0 +1,2 @@
public class X<T extends Compareable> {
}
@@ -0,0 +1,2 @@
public class X<T extends Runnable & Cloneable & Compareable> {
}
@@ -0,0 +1,2 @@
public class X<T extends Runnable & Compareable> {
}
@@ -0,0 +1,5 @@
import java.util.List;
import java.util.ArrayList;
class A {
}
@@ -0,0 +1,2 @@
class A {
}
@@ -0,0 +1,9 @@
import IdeaBug.Anno;
class IdeaBug {
@interface Anno { }
}
@Anno
public class IdeaBugUser extends IdeaBug {
}
@@ -0,0 +1,9 @@
import IdeaBug.Anno;
class IdeaBug {
@interface Anno { }
}
@Anno
public class IdeaBugUser extends IdeaBug {
}
@@ -0,0 +1,6 @@
import java.util.List;
// This is a comment
import java.util.ArrayList;
public class Test {
}
@@ -0,0 +1,4 @@
// This is a comment
public class Test {
}
@@ -0,0 +1,8 @@
import java.util.List;
/**
* @deprecated
*/
/
public class Foo {
}
@@ -0,0 +1,6 @@
/**
* @deprecated
*/
/
public class Foo {
}
@@ -0,0 +1,8 @@
import java.util.List;
class A {
B<List> create;
}
interface B<T> {
}
@@ -0,0 +1,8 @@
import java.util.List;
class A {
B<List> create;
}
interface B<T> {
}
@@ -0,0 +1,8 @@
import javax.swing.*;
class Foo{
{
JComponent component;
component.new AccessibleJComponent();
}
}
@@ -0,0 +1,8 @@
import javax.swing.*;
class Foo{
{
JComponent component;
component.new AccessibleJComponent();
}
}
@@ -0,0 +1,8 @@
import java.util.List;
import static java.util.Arrays.sort;
class Foo {
{
sort(new Integer[0]);
}
}
@@ -0,0 +1,7 @@
import static java.util.Arrays.sort;
class Foo {
{
sort(new Integer[0]);
}
}
@@ -0,0 +1,11 @@
import java.util.List;
import static java.util.Arrays.sort;
import static java.util.Arrays.asList;
import static java.util.Arrays.invalid;
import static invalid.*;
class Foo {
{
sort(new Integer[0]);
}
}
@@ -0,0 +1,9 @@
import java.util.List;
import static java.util.Arrays.sort;
import static invalid.*;
class Foo {
{
sort(new long[0]);
}
}
@@ -0,0 +1,7 @@
import static java.util.Arrays.sort;
class Foo {
{
sort(new long[0]);
}
}
@@ -0,0 +1,7 @@
import static java.util.Arrays.sort;
class Foo {
{
sort(new Integer[0]);
}
}
@@ -0,0 +1,11 @@
import xxxx.ddd;
import com.XXX;
import yyy.com.*;
import static zzz.yyy.com.AAA.*;
import static zzz.yyy.com.BBB;
class Foo {
{
}
}
@@ -0,0 +1,12 @@
import xxxx.ddd;
import com.XXX;
import yyy.com.*;
import static zzz.yyy.com.AAA.*;
import static zzz.yyy.com.BBB;
class Foo {
{
// maybe it's from yyy.com.*
ZZZ z = null;
}
}
@@ -0,0 +1,10 @@
import yyy.com.*;
import static zzz.yyy.com.AAA.*;
class Foo {
{
// maybe it's from yyy.com.*
ZZZ z = null;
}
}
@@ -0,0 +1,5 @@
class Foo {
{
}
}
@@ -1,8 +1,8 @@
PsiJavaFile:ImportListBug.java
PsiImportList
<empty list>
PsiDocComment
PsiDocToken:DOC_COMMENT_END('/**/')
PsiImportList
<empty list>
PsiClass:AClass
PsiDocComment
PsiDocToken:DOC_COMMENT_START('/**')
@@ -7,9 +7,9 @@ PsiJavaFile:ExtraOpeningBraceInMethod.java
PsiReferenceParameterList
<empty list>
PsiJavaToken:SEMICOLON(';')
PsiWhiteSpace('\n\n')
PsiImportList
<empty list>
PsiWhiteSpace('\n\n')
PsiClass:Foo
PsiModifierList:public
PsiKeyword:public('public')
@@ -7,9 +7,9 @@ PsiJavaFile:IncompleteAnnotation.java
PsiReferenceParameterList
<empty list>
PsiJavaToken:SEMICOLON(';')
PsiWhiteSpace('\n\n')
PsiImportList
<empty list>
PsiWhiteSpace('\n\n')
PsiClass:Foo
PsiModifierList:public
PsiKeyword:public('public')
@@ -7,9 +7,9 @@ PsiJavaFile:BindBeforeClass1.java
PsiReferenceParameterList
<empty list>
PsiJavaToken:SEMICOLON(';')
PsiWhiteSpace('\n\n')
PsiImportList
<empty list>
PsiWhiteSpace('\n\n')
PsiClass:A
PsiComment(END_OF_LINE_COMMENT)('// comment')
PsiWhiteSpace('\n')
@@ -1,8 +1,8 @@
PsiJavaFile:BindBeforeClass3.java
PsiImportList
<empty list>
PsiComment(END_OF_LINE_COMMENT)('// comment')
PsiWhiteSpace('\n\n')
PsiImportList
<empty list>
PsiClass:A
PsiModifierList:
<empty list>
@@ -7,10 +7,10 @@ PsiJavaFile:BindBeforeClass4.java
PsiReferenceParameterList
<empty list>
PsiJavaToken:SEMICOLON(';')
PsiComment(END_OF_LINE_COMMENT)('// comment')
PsiWhiteSpace('\n')
PsiImportList
<empty list>
PsiComment(END_OF_LINE_COMMENT)('// comment')
PsiWhiteSpace('\n')
PsiClass:A
PsiModifierList:
<empty list>
@@ -0,0 +1 @@
/* comment */class A { }
@@ -0,0 +1,20 @@
PsiJavaFile:BindBeforeClass6.java
PsiImportList
<empty list>
PsiClass:A
PsiComment(C_STYLE_COMMENT)('/* comment */')
PsiModifierList:
<empty list>
PsiKeyword:class('class')
PsiWhiteSpace(' ')
PsiIdentifier:A('A')
PsiTypeParameterList
<empty list>
PsiReferenceList
<empty list>
PsiReferenceList
<empty list>
PsiWhiteSpace(' ')
PsiJavaToken:LBRACE('{')
PsiWhiteSpace(' ')
PsiJavaToken:RBRACE('}')
@@ -1,8 +1,8 @@
PsiJavaFile:Errors0.java
PsiImportList
<empty list>
PsiComment(END_OF_LINE_COMMENT)('// illegal modifier combinations')
PsiWhiteSpace('\n\n')
PsiImportList
<empty list>
PsiClass:a
PsiModifierList:abstract public
PsiKeyword:abstract('abstract')
@@ -13,9 +13,9 @@ PsiJavaFile:BindDocComment1.java
PsiReferenceParameterList
<empty list>
PsiJavaToken:SEMICOLON(';')
PsiWhiteSpace('\n')
PsiImportList
<empty list>
PsiWhiteSpace('\n')
PsiClass:A
PsiModifierList:
<empty list>
@@ -0,0 +1,113 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4" relativePaths="false">
<component name="AntConfiguration">
<defaultAnt bundledAnt="true" />
</component>
<component name="CodeStyleManager">
<option name="USE_DEFAULT_CODE_STYLE_SCHEME" value="true" />
<option name="CODE_STYLE_SCHEME" value="" />
</component>
<component name="CodeStyleSettingsManager">
<option name="PER_PROJECT_SETTINGS" />
<option name="USE_PER_PROJECT_SETTINGS" value="false" />
</component>
<component name="CompilerConfiguration">
<option name="DEFAULT_COMPILER" value="Javac" />
<option name="CLEAR_OUTPUT_DIRECTORY" value="false" />
<resourceExtensions>
<entry name=".+\.(properties|xml|html)" />
<entry name=".+\.(gif|png|jpeg)" />
</resourceExtensions>
<wildcardResourcePatterns>
<entry name="?*.properties" />
<entry name="?*.xml" />
<entry name="?*.html" />
<entry name="?*.gif" />
<entry name="?*.png" />
<entry name="?*.jpeg" />
</wildcardResourcePatterns>
</component>
<component name="DataSourceManagerImpl" />
<component name="DependencyValidationManager">
<option name="UI_FLATTEN_PACKAGES" value="true" />
<option name="UI_SHOW_FILES" value="false" />
<option name="UI_SHOW_MODULES" value="true" />
<option name="UI_FILTER_LEGALS" value="false" />
</component>
<component name="EjbActionsConfiguration">
<option name="NEW_MESSAGE_BEAN_LAST_PACKAGE" value="" />
<option name="NEW_ENTITY_BEAN_LAST_PACKAGE" value="" />
<option name="NEW_SESSION_BEAN_LAST_PACKAGE" value="" />
</component>
<component name="EjbManager" enabled="false" />
<component name="EntryPointsManager">
<entry_points />
</component>
<component name="ExportToHTMLSettings">
<option name="PRINT_LINE_NUMBERS" value="false" />
<option name="OPEN_IN_BROWSER" value="false" />
<option name="OUTPUT_DIRECTORY" />
</component>
<component name="GUI Designer component loader factory" />
<component name="JUnitProjectSettings">
<option name="TEST_RUNNER" value="UI" />
</component>
<component name="JavacSettings">
<option name="DEBUGGING_INFO" value="true" />
<option name="GENERATE_NO_WARNINGS" value="false" />
<option name="DEPRECATION" value="true" />
<option name="ADDITIONAL_OPTIONS_STRING" value="-source 1.5" />
<option name="MAXIMUM_HEAP_SIZE" value="128" />
<option name="USE_GENERICS_COMPILER" value="false" />
</component>
<component name="JavadocGenerationManager">
<option name="OUTPUT_DIRECTORY" />
<option name="OPTION_SCOPE" value="protected" />
<option name="OPTION_HIERARCHY" value="false" />
<option name="OPTION_NAVIGATOR" value="false" />
<option name="OPTION_INDEX" value="false" />
<option name="OPTION_SEPARATE_INDEX" value="false" />
<option name="OPTION_DOCUMENT_TAG_USE" value="false" />
<option name="OPTION_DOCUMENT_TAG_AUTHOR" value="false" />
<option name="OPTION_DOCUMENT_TAG_VERSION" value="false" />
<option name="OPTION_DOCUMENT_TAG_DEPRECATED" value="false" />
<option name="OPTION_DEPRECATED_LIST" value="false" />
<option name="OTHER_OPTIONS" />
<option name="HEAP_SIZE" />
<option name="OPEN_IN_BROWSER" value="false" />
</component>
<component name="JikesSettings">
<option name="JIKES_PATH" value="" />
<option name="DEBUGGING_INFO" value="true" />
<option name="DEPRECATION" value="true" />
<option name="GENERATE_NO_WARNINGS" value="false" />
<option name="IS_EMACS_ERRORS_MODE" value="true" />
<option name="ADDITIONAL_OPTIONS_STRING" value="" />
</component>
<component name="Palette" />
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/cls.iml" filepath="$PROJECT_DIR$/cls.iml" />
</modules>
</component>
<component name="ProjectRootManager" version="2" assert-keyword="false" jdk-15="false" project-jdk-name="java version &quot;1.5.0-beta&quot;" />
<component name="RmicSettings">
<option name="IS_EANABLED" value="false" />
<option name="DEBUGGING_INFO" value="true" />
<option name="GENERATE_NO_WARNINGS" value="false" />
<option name="GENERATE_IIOP_STUBS" value="false" />
<option name="ADDITIONAL_OPTIONS_STRING" value="" />
</component>
<component name="WebManager">
<option enabled="false" />
</component>
<component name="WebReferencesManager" />
<component name="WebRootContainer" />
<component name="libraryTable" />
<component name="org.tmatesoft.tmate.projectComponent" />
<component name="uidesigner-configuration">
<option name="INSTRUMENT_CLASSES" value="true" />
<option name="COPY_FORMS_RUNTIME_TO_OUTPUT" value="true" />
</component>
</project>
@@ -0,0 +1,109 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="3" relativePaths="false">
<component name="ProjectRootManager" version="2">
<jdk name="java version &quot;1.4.1&quot;" />
<projectPath>
<root type="composite">
<root type="simple" url="file://$PROJECT_DIR$" />
</root>
</projectPath>
<sourcePath>
<root type="composite">
<root type="jdk" rootType="sourcePath" name="java version &quot;1.4.1&quot;" />
<root type="simple" url="file://$PROJECT_DIR$/src" />
</root>
</sourcePath>
<classPath>
<root type="composite">
<root type="jdk" rootType="classPath" name="java version &quot;1.4.1&quot;" />
<root type="output" />
</root>
</classPath>
<excludePath>
<root type="composite">
<root type="excludedOutput" />
</root>
</excludePath>
<javadocPath>
<root type="composite">
<root type="jdk" rootType="javadocPath" name="java version &quot;1.4.1&quot;" />
</root>
</javadocPath>
<assert_keyword enabled="no" />
<exclude_output enabled="yes" />
</component>
<component name="CompilerConfiguration">
<option name="DEFAULT_COMPILER" value="Javac" />
<option name="SYNCHRONIZE_OUTPUT_DIRECTORY" value="false" />
<option name="DEFAULT_OUTPUT_PATH" value="$PROJECT_DIR$" />
<option name="OUTPUT_MODE" value="single" />
<resourceExtensions>
<entry name=".+\.(properties|xml|html)" />
<entry name=".+\.(gif|png|jpeg)" />
</resourceExtensions>
</component>
<component name="JavacSettings">
<option name="DEBUGGING_INFO" value="true" />
<option name="GENERATE_NO_WARNINGS" value="false" />
<option name="DEPRECATION" value="true" />
<option name="ADDITIONAL_OPTIONS_STRING" value="" />
<option name="MAXIMUM_HEAP_SIZE" value="128" />
</component>
<component name="JikesSettings">
<option name="JIKES_PATH" value="" />
<option name="DEBUGGING_INFO" value="true" />
<option name="DEPRECATION" value="true" />
<option name="GENERATE_NO_WARNINGS" value="false" />
<option name="GENERATE_MAKE_FILE_DEPENDENCIES" value="false" />
<option name="DO_FULL_DEPENDENCE_CHECK" value="false" />
<option name="IS_EMACS_ERRORS_MODE" value="true" />
<option name="ADDITIONAL_OPTIONS_STRING" value="" />
</component>
<component name="AntConfiguration">
<option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
<option name="FILTER_TARGETS" value="false" />
</component>
<component name="JavadocGenerationManager">
<option name="OUTPUT_DIRECTORY" />
<option name="OPTION_SCOPE" value="protected" />
<option name="OPTION_HIERARCHY" value="false" />
<option name="OPTION_NAVIGATOR" value="false" />
<option name="OPTION_INDEX" value="false" />
<option name="OPTION_SEPARATE_INDEX" value="false" />
<option name="OPTION_DOCUMENT_TAG_USE" value="false" />
<option name="OPTION_DOCUMENT_TAG_AUTHOR" value="false" />
<option name="OPTION_DOCUMENT_TAG_VERSION" value="false" />
<option name="OPTION_DOCUMENT_TAG_DEPRECATED" value="false" />
<option name="OPTION_DEPRECATED_LIST" value="false" />
<option name="OTHER_OPTIONS" />
<option name="HEAP_SIZE" />
<option name="OPEN_IN_BROWSER" value="false" />
</component>
<component name="WebManager">
<option enabled="false" />
</component>
<component name="WebRootContainer" />
<component name="EjbManager" enabled="false" />
<component name="JUnitProjectSettings">
<option name="TEST_RUNNER" value="UI" />
</component>
<component name="EntryPointsManager">
<entry_points />
</component>
<component name="EjbActionsConfiguration">
<option name="NEW_MESSAGE_BEAN_LAST_PACKAGE" value="" />
<option name="NEW_ENTITY_BEAN_LAST_PACKAGE" value="" />
<option name="NEW_SESSION_BEAN_LAST_PACKAGE" value="" />
</component>
<component name="CodeStyleManager">
<option name="USE_DEFAULT_CODE_STYLE_SCHEME" value="true" />
<option name="CODE_STYLE_SCHEME" value="" />
</component>
<component name="ExportToHTMLSettings">
<option name="PRINT_LINE_NUMBERS" value="false" />
<option name="OPEN_IN_BROWSER" value="false" />
<option name="OUTPUT_DIRECTORY" />
</component>
<component name="WebReferencesManager" />
</project>

Some files were not shown because too many files have changed in this diff Show More