Merge remote-tracking branch 'origin/master'
@@ -45,7 +45,7 @@ target('default': 'The default target') {
|
||||
}
|
||||
|
||||
classpath {
|
||||
this["community-main"].testRuntimeClasspath().each {
|
||||
projectBuilder.moduleRuntimeClasspath(findModule("community-main"), true).each {
|
||||
pathelement(location: it)
|
||||
}
|
||||
pathelement(location: "${jdkHome}/lib/tools.jar")
|
||||
|
||||
@@ -64,7 +64,7 @@ target(compile: "Compile project") {
|
||||
}
|
||||
|
||||
private String appInfoFile() {
|
||||
return "${this["community-resources"].output}/idea/IdeaApplicationInfo.xml"
|
||||
return "${projectBuilder.moduleOutput(findModule("community-resources"))}/idea/IdeaApplicationInfo.xml"
|
||||
}
|
||||
|
||||
target('default': 'The default target') {
|
||||
|
||||
@@ -488,8 +488,8 @@ def reorder(String home, String targetDirectory) {
|
||||
arg(value: targetDirectory)
|
||||
arg(value: "$home/lib")
|
||||
classpath {
|
||||
pathelement(location: util.output)
|
||||
pathelement(location: getProperty('util-rt').output)
|
||||
pathelement(location: projectBuilder.moduleOutput(findModule("util")))
|
||||
pathelement(location: projectBuilder.moduleOutput(findModule("util-rt")))
|
||||
pathelement(location: "$home/lib/jna.jar")
|
||||
pathelement(location: "$home/lib/trove4j.jar")
|
||||
}
|
||||
|
||||
@@ -212,7 +212,7 @@ binding.setVariable("commonJvmArgs", {
|
||||
return [
|
||||
"-ea",
|
||||
"-Didea.home.path=$home",
|
||||
"-Xbootclasspath/p:${boot.output}",
|
||||
"-Xbootclasspath/p:${projectBuilder.moduleOutput(findModule("boot"))}",
|
||||
"-XX:+HeapDumpOnOutOfMemoryError",
|
||||
"-Didea.system.path=${p("teamcity.build.tempDir")}/system",
|
||||
"-Didea.config.path=${p("teamcity.build.tempDir")}/config",
|
||||
|
||||
@@ -261,7 +261,7 @@ public abstract class DestinationFolderComboBox extends ComboboxWithBrowseButton
|
||||
final ArrayList<DirectoryChooser.ItemWrapper> items,
|
||||
final DirectoryChooser.ItemWrapper initial,
|
||||
final DirectoryChooser.ItemWrapper oldOne) {
|
||||
if (initial != null || (items.size() > 2 && items.contains(NULL_WRAPPER)) || items.isEmpty()) {
|
||||
if (initial != null || ((initialTargetDirectorySourceRoot == null || items.size() > 2) && items.contains(NULL_WRAPPER)) || items.isEmpty()) {
|
||||
return initial;
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -305,7 +305,17 @@ public class JavaBuilder extends ModuleLevelBuilder {
|
||||
final int filesCount = files.size();
|
||||
boolean compiledOk = true;
|
||||
if (filesCount > 0) {
|
||||
LOG.info("Compiling " + filesCount + " java files; module: " + chunkName);
|
||||
LOG.info("Compiling " + filesCount + " java files; module: " + chunkName + (context.isCompilingTests() ? " (tests)" : ""));
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug(" classpath for " + chunkName + ":");
|
||||
for (File file : classpath) {
|
||||
LOG.debug(" " + file.getAbsolutePath());
|
||||
}
|
||||
LOG.debug(" platform classpath for " + chunkName + ":");
|
||||
for (File file : platformCp) {
|
||||
LOG.debug(" " + file.getAbsolutePath());
|
||||
}
|
||||
}
|
||||
compiledOk = compileJava(context, chunk, files, classpath, platformCp, tempRootsSourcePath, diagnosticSink, outputSink);
|
||||
}
|
||||
|
||||
@@ -838,8 +848,8 @@ public class JavaBuilder extends ModuleLevelBuilder {
|
||||
final Map<File, Set<File>> map = new LinkedHashMap<File, Set<File>>();
|
||||
final boolean compilingTests = context.isCompilingTests();
|
||||
for (JpsModule module : chunk.getModules()) {
|
||||
final String outputUrl = JpsJavaExtensionService.getInstance().getOutputUrl(module, compilingTests);
|
||||
if (outputUrl == null) {
|
||||
final File outputDir = JpsJavaExtensionService.getInstance().getOutputDirectory(module, compilingTests);
|
||||
if (outputDir == null) {
|
||||
continue;
|
||||
}
|
||||
final Set<File> roots = new LinkedHashSet<File>();
|
||||
@@ -848,7 +858,7 @@ public class JavaBuilder extends ModuleLevelBuilder {
|
||||
roots.add(descriptor.root);
|
||||
}
|
||||
}
|
||||
map.put(JpsPathUtil.urlToFile(outputUrl), roots);
|
||||
map.put(outputDir, roots);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@@ -20,4 +20,7 @@ public interface JpsJavaDependenciesEnumerator extends JpsDependenciesEnumerator
|
||||
JpsJavaDependenciesEnumerator recursively();
|
||||
|
||||
JpsJavaDependenciesEnumerator includedIn(JpsJavaClasspathKind classpathKind);
|
||||
|
||||
JpsJavaDependenciesRootsEnumerator classes();
|
||||
JpsJavaDependenciesRootsEnumerator sources();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
package org.jetbrains.jps.model.java;
|
||||
|
||||
import org.jetbrains.jps.model.module.JpsDependenciesRootsEnumerator;
|
||||
|
||||
/**
|
||||
* @author nik
|
||||
*/
|
||||
public interface JpsJavaDependenciesRootsEnumerator extends JpsDependenciesRootsEnumerator {
|
||||
JpsJavaDependenciesRootsEnumerator withoutSelfModuleOutput();
|
||||
}
|
||||
@@ -13,6 +13,7 @@ import org.jetbrains.jps.model.module.JpsModuleReference;
|
||||
import org.jetbrains.jps.service.JpsServiceManager;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -33,6 +34,14 @@ public abstract class JpsJavaExtensionService {
|
||||
return getInstance().enumerateDependencies(module);
|
||||
}
|
||||
|
||||
public static JpsJavaDependenciesEnumerator dependencies(JpsProject project) {
|
||||
return getInstance().enumerateDependencies(project);
|
||||
}
|
||||
|
||||
public abstract JpsJavaDependenciesEnumerator enumerateDependencies(Collection<JpsModule> modules);
|
||||
|
||||
protected abstract JpsJavaDependenciesEnumerator enumerateDependencies(JpsProject project);
|
||||
|
||||
protected abstract JpsJavaDependenciesEnumerator enumerateDependencies(JpsModule module);
|
||||
|
||||
@NotNull
|
||||
|
||||
@@ -36,4 +36,6 @@ public interface JpsLibrary extends JpsNamedElement, JpsReferenceableElement<Jps
|
||||
JpsElement getProperties();
|
||||
|
||||
List<File> getFiles(final JpsOrderRootType rootType);
|
||||
|
||||
List<String> getRootUrls(final JpsOrderRootType rootType);
|
||||
}
|
||||
|
||||
@@ -30,4 +30,6 @@ public interface JpsDependenciesList extends JpsElement {
|
||||
|
||||
@NotNull
|
||||
List<JpsDependencyElement> getDependencies();
|
||||
|
||||
void clear();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
package org.jetbrains.jps.model.module;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* @author nik
|
||||
*/
|
||||
public interface JpsDependenciesRootsEnumerator {
|
||||
Collection<String> getUrls();
|
||||
}
|
||||
@@ -16,5 +16,5 @@ public interface JpsSdkReferencesTable extends JpsCompositeElement {
|
||||
JpsSdkReference<P> getSdkReference(@NotNull JpsSdkType<P> type);
|
||||
|
||||
<P extends JpsElement>
|
||||
void setSdkReference(@NotNull JpsSdkType<P> type, @NotNull JpsSdkReference<P> sdkReference);
|
||||
void setSdkReference(@NotNull JpsSdkType<P> type, @Nullable JpsSdkReference<P> sdkReference);
|
||||
}
|
||||
|
||||
@@ -83,6 +83,13 @@ public class JpsElementCollectionImpl<E extends JpsElement> extends JpsElementBa
|
||||
}
|
||||
}
|
||||
|
||||
public void removeAllChildren() {
|
||||
List<E> elements = new ArrayList<E>(myElements);
|
||||
for (E element : elements) {
|
||||
removeChild(element);
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public JpsElementCollectionImpl<E> createCopy() {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package org.jetbrains.jps.model.java.impl;
|
||||
|
||||
import org.jetbrains.jps.model.java.*;
|
||||
import org.jetbrains.jps.model.library.JpsOrderRootType;
|
||||
import org.jetbrains.jps.model.module.JpsDependencyElement;
|
||||
import org.jetbrains.jps.model.module.JpsModule;
|
||||
import org.jetbrains.jps.model.module.impl.JpsDependenciesEnumeratorBase;
|
||||
@@ -15,6 +16,7 @@ public class JpsJavaDependenciesEnumeratorImpl extends JpsDependenciesEnumerator
|
||||
private boolean myRuntimeOnly;
|
||||
private boolean myCompileOnly;
|
||||
private boolean myExportedOnly;
|
||||
private boolean myRecursivelyExportedOnly;
|
||||
private JpsJavaClasspathKind myClasspathKind;
|
||||
|
||||
public JpsJavaDependenciesEnumeratorImpl(Collection<JpsModule> rootModules) {
|
||||
@@ -41,7 +43,12 @@ public class JpsJavaDependenciesEnumeratorImpl extends JpsDependenciesEnumerator
|
||||
|
||||
@Override
|
||||
public JpsJavaDependenciesEnumerator exportedOnly() {
|
||||
myExportedOnly = true;
|
||||
if (myRecursively) {
|
||||
myRecursivelyExportedOnly = true;
|
||||
}
|
||||
else {
|
||||
myExportedOnly = true;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -51,13 +58,23 @@ public class JpsJavaDependenciesEnumeratorImpl extends JpsDependenciesEnumerator
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JpsJavaDependenciesRootsEnumerator classes() {
|
||||
return new JpsJavaDependenciesRootsEnumeratorImpl(this, JpsOrderRootType.COMPILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JpsJavaDependenciesRootsEnumerator sources() {
|
||||
return new JpsJavaDependenciesRootsEnumeratorImpl(this, JpsOrderRootType.SOURCES);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected JpsJavaDependenciesEnumeratorImpl self() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean shouldProcess(JpsDependencyElement element) {
|
||||
protected boolean shouldProcess(JpsModule module, JpsDependencyElement element) {
|
||||
boolean exported = false;
|
||||
JpsJavaDependencyExtension extension = JpsJavaExtensionService.getInstance().getDependencyExtension(element);
|
||||
if (extension != null) {
|
||||
@@ -78,7 +95,12 @@ public class JpsJavaDependenciesEnumeratorImpl extends JpsDependenciesEnumerator
|
||||
}
|
||||
if (!exported) {
|
||||
if (myExportedOnly) return false;
|
||||
if (myRecursivelyExportedOnly && !isEnumerationRootModule(module)) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean isProductionOnly() {
|
||||
return myProductionOnly;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
package org.jetbrains.jps.model.java.impl;
|
||||
|
||||
import com.intellij.util.Consumer;
|
||||
import org.jetbrains.jps.model.java.JavaSourceRootType;
|
||||
import org.jetbrains.jps.model.java.JpsJavaDependenciesRootsEnumerator;
|
||||
import org.jetbrains.jps.model.java.JpsJavaExtensionService;
|
||||
import org.jetbrains.jps.model.library.JpsOrderRootType;
|
||||
import org.jetbrains.jps.model.module.JpsModule;
|
||||
import org.jetbrains.jps.model.module.JpsModuleSourceRoot;
|
||||
import org.jetbrains.jps.model.module.JpsModuleSourceRootType;
|
||||
import org.jetbrains.jps.model.module.impl.JpsDependenciesRootsEnumeratorBase;
|
||||
|
||||
/**
|
||||
* @author nik
|
||||
*/
|
||||
public class JpsJavaDependenciesRootsEnumeratorImpl extends JpsDependenciesRootsEnumeratorBase<JpsJavaDependenciesEnumeratorImpl> implements JpsJavaDependenciesRootsEnumerator {
|
||||
private boolean myWithoutSelfModuleOutput;
|
||||
|
||||
public JpsJavaDependenciesRootsEnumeratorImpl(JpsJavaDependenciesEnumeratorImpl dependenciesEnumerator, JpsOrderRootType rootType) {
|
||||
super(dependenciesEnumerator, rootType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JpsJavaDependenciesRootsEnumerator withoutSelfModuleOutput() {
|
||||
myWithoutSelfModuleOutput = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
protected boolean processModuleRootUrls(JpsModule module, Consumer<String> urlConsumer) {
|
||||
boolean productionOnly = myDependenciesEnumerator.isProductionOnly();
|
||||
if (myRootType == JpsOrderRootType.SOURCES) {
|
||||
for (JpsModuleSourceRoot root : module.getSourceRoots()) {
|
||||
JpsModuleSourceRootType<?> type = root.getRootType();
|
||||
if (type.equals(JavaSourceRootType.SOURCE) || !productionOnly && type.equals(JavaSourceRootType.TEST_SOURCE)) {
|
||||
urlConsumer.consume(root.getUrl());
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (myRootType == JpsOrderRootType.COMPILED) {
|
||||
JpsJavaExtensionService extensionService = JpsJavaExtensionService.getInstance();
|
||||
if (myWithoutSelfModuleOutput && myDependenciesEnumerator.isEnumerationRootModule(module)) {
|
||||
if (!productionOnly) {
|
||||
String url = extensionService.getOutputUrl(module, false);
|
||||
if (url != null) {
|
||||
urlConsumer.consume(url);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
String outputUrl = extensionService.getOutputUrl(module, false);
|
||||
if (!productionOnly) {
|
||||
String testsOutputUrl = extensionService.getOutputUrl(module, true);
|
||||
if (testsOutputUrl != null && !testsOutputUrl.equals(outputUrl)) {
|
||||
urlConsumer.consume(testsOutputUrl);
|
||||
}
|
||||
}
|
||||
if (outputUrl != null) {
|
||||
urlConsumer.consume(outputUrl);
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -16,6 +16,7 @@ import org.jetbrains.jps.model.module.*;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@@ -154,6 +155,16 @@ public class JpsJavaExtensionServiceImpl extends JpsJavaExtensionService {
|
||||
return new JpsTestModuleOutputPackagingElementImpl(moduleReference);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JpsJavaDependenciesEnumerator enumerateDependencies(Collection<JpsModule> modules) {
|
||||
return new JpsJavaDependenciesEnumeratorImpl(modules);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected JpsJavaDependenciesEnumerator enumerateDependencies(JpsProject project) {
|
||||
return new JpsJavaDependenciesEnumeratorImpl(project.getModules());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected JpsJavaDependenciesEnumerator enumerateDependencies(JpsModule module) {
|
||||
return new JpsJavaDependenciesEnumeratorImpl(Collections.singletonList(module));
|
||||
|
||||
@@ -4,12 +4,13 @@ import com.intellij.openapi.util.io.FileUtilRt;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.jps.JpsPathUtil;
|
||||
import org.jetbrains.jps.model.*;
|
||||
import org.jetbrains.jps.model.impl.*;
|
||||
import org.jetbrains.jps.model.impl.JpsElementCollectionImpl;
|
||||
import org.jetbrains.jps.model.impl.JpsElementCollectionRole;
|
||||
import org.jetbrains.jps.model.impl.JpsNamedCompositeElementBase;
|
||||
import org.jetbrains.jps.model.library.*;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@@ -111,25 +112,34 @@ public class JpsLibraryImpl<P extends JpsElement> extends JpsNamedCompositeEleme
|
||||
|
||||
@Override
|
||||
public List<File> getFiles(final JpsOrderRootType rootType) {
|
||||
List<File> files = new ArrayList<File>();
|
||||
for (JpsLibraryRoot root : getRoots(rootType)) {
|
||||
final File file = JpsPathUtil.urlToFile(root.getUrl());
|
||||
switch (root.getInclusionOptions()) {
|
||||
case ROOT_ITSELF:
|
||||
files.add(file);
|
||||
break;
|
||||
case ARCHIVES_UNDER_ROOT:
|
||||
collectArchives(file, false, files);
|
||||
break;
|
||||
case ARCHIVES_UNDER_ROOT_RECURSIVELY:
|
||||
collectArchives(file, true, files);
|
||||
break;
|
||||
}
|
||||
List<String> urls = getRootUrls(rootType);
|
||||
List<File> files = new ArrayList<File>(urls.size());
|
||||
for (String url : urls) {
|
||||
files.add(JpsPathUtil.urlToFile(url));
|
||||
}
|
||||
return files;
|
||||
}
|
||||
|
||||
private static void collectArchives(File file, boolean recursively, Collection<File> result) {
|
||||
@Override
|
||||
public List<String> getRootUrls(JpsOrderRootType rootType) {
|
||||
List<String> urls = new ArrayList<String>();
|
||||
for (JpsLibraryRoot root : getRoots(rootType)) {
|
||||
switch (root.getInclusionOptions()) {
|
||||
case ROOT_ITSELF:
|
||||
urls.add(root.getUrl());
|
||||
break;
|
||||
case ARCHIVES_UNDER_ROOT:
|
||||
collectArchives(JpsPathUtil.urlToFile(root.getUrl()), false, urls);
|
||||
break;
|
||||
case ARCHIVES_UNDER_ROOT_RECURSIVELY:
|
||||
collectArchives(JpsPathUtil.urlToFile(root.getUrl()), true, urls);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return urls;
|
||||
}
|
||||
|
||||
private static void collectArchives(File file, boolean recursively, List<String> result) {
|
||||
final File[] children = file.listFiles();
|
||||
if (children != null) {
|
||||
for (File child : children) {
|
||||
@@ -140,7 +150,7 @@ public class JpsLibraryImpl<P extends JpsElement> extends JpsNamedCompositeEleme
|
||||
}
|
||||
}
|
||||
else if (extension.equals("jar") || extension.equals("zip")) {
|
||||
result.add(child);
|
||||
result.add(JpsPathUtil.getLibraryRootUrl(child));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ public abstract class JpsDependenciesEnumeratorBase<Self extends JpsDependencies
|
||||
});
|
||||
}
|
||||
|
||||
private boolean processDependencies(Processor<JpsDependencyElement> processor) {
|
||||
public boolean processDependencies(Processor<JpsDependencyElement> processor) {
|
||||
THashSet<JpsModule> processed = new THashSet<JpsModule>();
|
||||
for (JpsModule module : myRootModules) {
|
||||
if (!doProcessDependencies(module, processor, processed)) {
|
||||
@@ -104,15 +104,15 @@ public abstract class JpsDependenciesEnumeratorBase<Self extends JpsDependencies
|
||||
if (!myRecursively && element instanceof JpsModuleDependency) continue;
|
||||
if (element instanceof JpsModuleSourceDependency && !isEnumerationRootModule(module)) continue;
|
||||
}
|
||||
if (shouldProcess(element)) {
|
||||
|
||||
if (!shouldProcess(module, element)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (element instanceof JpsModuleDependency) {
|
||||
if (myRecursively) {
|
||||
JpsModule depModule = ((JpsModuleDependency)element).getModule();
|
||||
if (depModule != null) {
|
||||
doProcessDependencies(module, processor, processed);
|
||||
doProcessDependencies(depModule, processor, processed);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -127,11 +127,11 @@ public abstract class JpsDependenciesEnumeratorBase<Self extends JpsDependencies
|
||||
return true;
|
||||
}
|
||||
|
||||
protected boolean shouldProcess(JpsDependencyElement element) {
|
||||
protected boolean shouldProcess(JpsModule module, JpsDependencyElement element) {
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean isEnumerationRootModule(JpsModule module) {
|
||||
public boolean isEnumerationRootModule(JpsModule module) {
|
||||
return myRootModules.contains(module);
|
||||
}
|
||||
|
||||
|
||||
@@ -33,6 +33,11 @@ public class JpsDependenciesListImpl extends JpsCompositeElementBase<JpsDependen
|
||||
return myContainer.getChild(DEPENDENCY_COLLECTION_ROLE).getElements();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clear() {
|
||||
myContainer.getChild(DEPENDENCY_COLLECTION_ROLE).removeAllChildren();
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public JpsModuleDependency addModuleDependency(@NotNull JpsModule module) {
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
package org.jetbrains.jps.model.module.impl;
|
||||
|
||||
import com.intellij.util.CollectConsumer;
|
||||
import com.intellij.util.Consumer;
|
||||
import com.intellij.util.Processor;
|
||||
import org.jetbrains.jps.model.library.JpsLibrary;
|
||||
import org.jetbrains.jps.model.library.JpsOrderRootType;
|
||||
import org.jetbrains.jps.model.module.*;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author nik
|
||||
*/
|
||||
public abstract class JpsDependenciesRootsEnumeratorBase<E extends JpsDependenciesEnumeratorBase<?>> implements JpsDependenciesRootsEnumerator {
|
||||
protected final JpsOrderRootType myRootType;
|
||||
protected final E myDependenciesEnumerator;
|
||||
|
||||
public JpsDependenciesRootsEnumeratorBase(E dependenciesEnumerator, JpsOrderRootType rootType) {
|
||||
myDependenciesEnumerator = dependenciesEnumerator;
|
||||
myRootType = rootType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<String> getUrls() {
|
||||
Set<String> urls = new LinkedHashSet<String>();
|
||||
processUrls(new CollectConsumer<String>(urls));
|
||||
return urls;
|
||||
}
|
||||
|
||||
private void processUrls(final Consumer<String> urlConsumer) {
|
||||
myDependenciesEnumerator.processDependencies(new Processor<JpsDependencyElement>() {
|
||||
@Override
|
||||
public boolean process(JpsDependencyElement dependencyElement) {
|
||||
if (dependencyElement instanceof JpsModuleSourceDependency) {
|
||||
processModuleRootUrls(dependencyElement.getContainingModule(), urlConsumer);
|
||||
}
|
||||
else if (dependencyElement instanceof JpsModuleDependency) {
|
||||
JpsModule dep = ((JpsModuleDependency)dependencyElement).getModule();
|
||||
if (dep != null) {
|
||||
processModuleRootUrls(dep, urlConsumer);
|
||||
}
|
||||
}
|
||||
else if (dependencyElement instanceof JpsLibraryDependency) {
|
||||
JpsLibrary lib = ((JpsLibraryDependency)dependencyElement).getLibrary();
|
||||
if (lib != null) {
|
||||
processLibraryRootUrls(lib, urlConsumer);
|
||||
}
|
||||
}
|
||||
else if (dependencyElement instanceof JpsSdkDependency) {
|
||||
JpsLibrary lib = ((JpsSdkDependency)dependencyElement).resolveSdk();
|
||||
if (lib != null) {
|
||||
processLibraryRootUrls(lib, urlConsumer);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private boolean processLibraryRootUrls(JpsLibrary library, Consumer<String> urlConsumer) {
|
||||
for (String url : library.getRootUrls(myRootType)) {
|
||||
urlConsumer.consume(url);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
protected abstract boolean processModuleRootUrls(JpsModule module, Consumer<String> urlConsumer);
|
||||
}
|
||||
@@ -38,6 +38,7 @@ public class JpsModuleImpl<P extends JpsElement> extends JpsNamedCompositeElemen
|
||||
myContainer.setChild(EXCLUDED_ROOTS_ROLE);
|
||||
myContainer.setChild(JpsFacetRole.COLLECTION_ROLE);
|
||||
myContainer.setChild(DEPENDENCIES_LIST_CHILD_ROLE, new JpsDependenciesListImpl());
|
||||
getDependenciesList().addModuleSourceDependency();
|
||||
myLibraryCollection = new JpsLibraryCollectionImpl(myContainer.setChild(JpsLibraryRole.LIBRARIES_COLLECTION_ROLE));
|
||||
myContainer.setChild(JpsModuleSourceRootRole.ROOT_COLLECTION_ROLE);
|
||||
myContainer.setChild(JpsSdkReferencesTableImpl.ROLE);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package org.jetbrains.jps.model.module.impl;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.jps.model.JpsElement;
|
||||
import org.jetbrains.jps.model.JpsElementCreator;
|
||||
import org.jetbrains.jps.model.impl.JpsCompositeElementBase;
|
||||
@@ -30,8 +31,14 @@ public class JpsSdkReferencesTableImpl extends JpsCompositeElementBase<JpsSdkRef
|
||||
}
|
||||
|
||||
@Override
|
||||
public <P extends JpsElement> void setSdkReference(@NotNull JpsSdkType<P> type, @NotNull JpsSdkReference<P> sdkReference) {
|
||||
myContainer.setChild(new JpsSdkReferenceRole<P>(type), sdkReference);
|
||||
public <P extends JpsElement> void setSdkReference(@NotNull JpsSdkType<P> type, @Nullable JpsSdkReference<P> sdkReference) {
|
||||
JpsSdkReferenceRole<P> role = new JpsSdkReferenceRole<P>(type);
|
||||
if (sdkReference != null) {
|
||||
myContainer.setChild(role, sdkReference);
|
||||
}
|
||||
else {
|
||||
myContainer.removeChild(role);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,246 @@
|
||||
package org.jetbrains.jps.model;
|
||||
|
||||
import com.intellij.openapi.application.PathManager;
|
||||
import com.intellij.openapi.application.ex.PathManagerEx;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import org.jetbrains.jps.JpsPathUtil;
|
||||
import org.jetbrains.jps.model.java.*;
|
||||
import org.jetbrains.jps.model.library.JpsLibrary;
|
||||
import org.jetbrains.jps.model.library.JpsOrderRootType;
|
||||
import org.jetbrains.jps.model.library.JpsTypedLibrary;
|
||||
import org.jetbrains.jps.model.library.sdk.JpsSdk;
|
||||
import org.jetbrains.jps.model.module.JpsLibraryDependency;
|
||||
import org.jetbrains.jps.model.module.JpsModule;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
|
||||
|
||||
/**
|
||||
* @author nik
|
||||
*/
|
||||
public class JpsDependenciesEnumeratorTest extends JpsJavaModelTestCase {
|
||||
private JpsTypedLibrary<JpsSdk<JpsDummyElement>> myJdk;
|
||||
private JpsModule myModule;
|
||||
|
||||
@Override
|
||||
public void setUp() throws Exception {
|
||||
super.setUp();
|
||||
File home = PathManagerEx.findFileUnderCommunityHome("java/mockJDK-1.7");
|
||||
myJdk = myModel.getGlobal().addSdk("mockJDK-1.7", home.getAbsolutePath(), "1.7", JpsJavaSdkType.INSTANCE);
|
||||
myJdk.addRoot(getRtJar(), JpsOrderRootType.COMPILED);
|
||||
myModule = addModule();
|
||||
myModule.getSdkReferencesTable().setSdkReference(JpsJavaSdkType.INSTANCE, myJdk.getProperties().createReference());
|
||||
myModule.getDependenciesList().addSdkDependency(JpsJavaSdkType.INSTANCE);
|
||||
}
|
||||
|
||||
public void testLibrary() throws Exception {
|
||||
JpsModuleRootModificationUtil.addDependency(myModule, createJDomLibrary());
|
||||
|
||||
assertClassRoots(orderEntries(myModule), getRtJar(), getJDomJar());
|
||||
assertClassRoots(orderEntries(myModule).withoutSdk(), getJDomJar());
|
||||
assertClassRoots(orderEntries(myModule).withoutSdk().productionOnly().runtimeOnly(), getJDomJar());
|
||||
assertClassRoots(orderEntries(myModule).withoutLibraries(), getRtJar());
|
||||
assertSourceRoots(orderEntries(myModule), getJDomSources());
|
||||
}
|
||||
|
||||
private String getJDomSources() {
|
||||
return getJarUrlFromLibDir("src/jdom.zip");
|
||||
}
|
||||
|
||||
private String getJDomJar() {
|
||||
return getJarUrlFromLibDir("jdom.jar");
|
||||
}
|
||||
|
||||
private String getAsmJar() {
|
||||
return getJarUrlFromLibDir("asm.jar");
|
||||
}
|
||||
|
||||
private String getJarUrlFromLibDir(final String relativePath) {
|
||||
return JpsPathUtil.getLibraryRootUrl(PathManager.findFileInLibDirectory(relativePath));
|
||||
}
|
||||
|
||||
private String getRtJar() {
|
||||
return JpsPathUtil.getLibraryRootUrl(PathManagerEx.findFileUnderCommunityHome("java/mockJDK-1.7/jre/lib/rt.jar"));
|
||||
}
|
||||
|
||||
private JpsLibrary createJDomLibrary() {
|
||||
JpsLibrary library = addLibrary("jdom");
|
||||
library.addRoot(getJDomJar(), JpsOrderRootType.COMPILED);
|
||||
library.addRoot(getJDomSources(), JpsOrderRootType.SOURCES);
|
||||
return library;
|
||||
}
|
||||
|
||||
private JpsLibrary createAsmLibrary() {
|
||||
JpsLibrary library = addLibrary("asm");
|
||||
library.addRoot(getAsmJar(), JpsOrderRootType.COMPILED);
|
||||
return library;
|
||||
}
|
||||
|
||||
public void testModuleSources() throws Exception {
|
||||
final String srcRoot = addSourceRoot(myModule, false);
|
||||
final String testRoot = addSourceRoot(myModule, true);
|
||||
final String output = setModuleOutput(myModule, false);
|
||||
final String testOutput = setModuleOutput(myModule, true);
|
||||
|
||||
assertClassRoots(orderEntries(myModule).withoutSdk(), testOutput, output);
|
||||
assertClassRoots(orderEntries(myModule).withoutSdk().productionOnly(), output);
|
||||
assertSourceRoots(orderEntries(myModule), srcRoot, testRoot);
|
||||
assertSourceRoots(orderEntries(myModule).productionOnly(), srcRoot);
|
||||
|
||||
assertEnumeratorRoots(orderEntries(myModule).withoutSdk().classes().withoutSelfModuleOutput(), output);
|
||||
assertEnumeratorRoots(orderEntries(myModule).withoutSdk().productionOnly().classes().withoutSelfModuleOutput());
|
||||
}
|
||||
|
||||
public void testLibraryScope() throws Exception {
|
||||
JpsLibraryDependency dependency = myModule.getDependenciesList().addLibraryDependency(createJDomLibrary());
|
||||
JpsJavaExtensionService.getInstance().getOrCreateDependencyExtension(dependency).setScope(JpsJavaDependencyScope.RUNTIME);
|
||||
JpsModuleRootModificationUtil.addDependency(myModule, createJDomLibrary(), JpsJavaDependencyScope.RUNTIME, false);
|
||||
|
||||
assertClassRoots(orderEntries(myModule).withoutSdk(), getJDomJar());
|
||||
assertClassRoots(orderEntries(myModule).withoutSdk().exportedOnly());
|
||||
assertClassRoots(orderEntries(myModule).withoutSdk().compileOnly());
|
||||
}
|
||||
|
||||
public void testModuleDependency() throws Exception {
|
||||
final JpsModule dep = addModule("dep");
|
||||
final String depSrcRoot = addSourceRoot(dep, false);
|
||||
final String depTestRoot = addSourceRoot(dep, true);
|
||||
final String depOutput = setModuleOutput(dep, false);
|
||||
final String depTestOutput = setModuleOutput(dep, true);
|
||||
JpsModuleRootModificationUtil.addDependency(dep, createJDomLibrary(), JpsJavaDependencyScope.COMPILE, true);
|
||||
JpsModuleRootModificationUtil.addDependency(myModule, dep, JpsJavaDependencyScope.COMPILE, true);
|
||||
|
||||
final String srcRoot = addSourceRoot(myModule, false);
|
||||
final String testRoot = addSourceRoot(myModule, true);
|
||||
final String output = setModuleOutput(myModule, false);
|
||||
final String testOutput = setModuleOutput(myModule, true);
|
||||
|
||||
assertClassRoots(orderEntries(myModule).withoutSdk(), testOutput, output, depTestOutput, depOutput);
|
||||
assertClassRoots(orderEntries(myModule).withoutSdk().recursively(), testOutput, output, depTestOutput, depOutput, getJDomJar());
|
||||
assertSourceRoots(orderEntries(myModule), srcRoot, testRoot, depSrcRoot, depTestRoot);
|
||||
assertSourceRoots(orderEntries(myModule).recursively(), srcRoot, testRoot, depSrcRoot, depTestRoot, getJDomSources());
|
||||
|
||||
assertClassRoots(orderEntries(myModule).withoutSdk().withoutModuleSourceEntries().recursively(), getJDomJar());
|
||||
assertSourceRoots(orderEntries(myModule).withoutSdk().withoutModuleSourceEntries().recursively(), getJDomSources());
|
||||
assertEnumeratorRoots(orderEntries(myModule).withoutSdk().withoutModuleSourceEntries().recursively().classes(), getJDomJar());
|
||||
assertEnumeratorRoots(orderEntries(myModule).withoutSdk().withoutModuleSourceEntries().recursively().sources(), getJDomSources());
|
||||
|
||||
assertEnumeratorRoots(orderEntries(myModule).withoutSdk().recursively().classes().withoutSelfModuleOutput(),
|
||||
output, depTestOutput, depOutput, getJDomJar());
|
||||
assertEnumeratorRoots(orderEntries(myModule).productionOnly().withoutSdk().recursively().classes().withoutSelfModuleOutput(),
|
||||
depOutput, getJDomJar());
|
||||
|
||||
assertClassRoots(orderEntries(myModule).withoutSdk().withoutDepModules().withoutModuleSourceEntries().recursively(), getJDomJar());
|
||||
assertEnumeratorRoots(
|
||||
orderEntries(myModule).productionOnly().withoutSdk().withoutDepModules().withoutModuleSourceEntries().recursively().classes(),
|
||||
getJDomJar());
|
||||
assertClassRoots(orderEntries(myModule).withoutSdk().withoutDepModules().withoutModuleSourceEntries());
|
||||
assertEnumeratorRoots(orderEntries(myModule).productionOnly().withoutModuleSourceEntries().withoutSdk().withoutDepModules().classes());
|
||||
}
|
||||
|
||||
public void testModuleJpsJavaDependencyScope() throws Exception {
|
||||
final JpsModule dep = addModule("dep");
|
||||
JpsModuleRootModificationUtil.addDependency(dep, createJDomLibrary(), JpsJavaDependencyScope.COMPILE, true);
|
||||
JpsModuleRootModificationUtil.addDependency(myModule, dep, JpsJavaDependencyScope.TEST, true);
|
||||
|
||||
assertClassRoots(orderEntries(myModule).withoutSdk());
|
||||
assertClassRoots(orderEntries(myModule).withoutSdk().recursively(), getJDomJar());
|
||||
assertClassRoots(orderEntries(myModule).withoutSdk().exportedOnly().recursively(), getJDomJar());
|
||||
assertClassRoots(orderEntries(myModule).withoutSdk().productionOnly().recursively());
|
||||
|
||||
assertClassRoots(orderEntries(myProject).withoutSdk(), getJDomJar());
|
||||
assertClassRoots(orderEntries(myProject).withoutSdk().productionOnly(), getJDomJar());
|
||||
}
|
||||
|
||||
public void testNotExportedLibrary() throws Exception {
|
||||
final JpsModule dep = addModule("dep");
|
||||
JpsModuleRootModificationUtil.addDependency(dep, createJDomLibrary(), JpsJavaDependencyScope.COMPILE, false);
|
||||
JpsModuleRootModificationUtil.addDependency(myModule, createAsmLibrary(), JpsJavaDependencyScope.COMPILE, false);
|
||||
JpsModuleRootModificationUtil.addDependency(myModule, dep, JpsJavaDependencyScope.COMPILE, false);
|
||||
|
||||
assertClassRoots(orderEntries(myModule).withoutSdk(), getAsmJar());
|
||||
assertClassRoots(orderEntries(myModule).withoutSdk().recursively(), getAsmJar(), getJDomJar());
|
||||
assertClassRoots(orderEntries(myModule).withoutSdk().recursively().exportedOnly(), getAsmJar());
|
||||
assertClassRoots(orderEntries(myModule).withoutSdk().exportedOnly().recursively());
|
||||
}
|
||||
|
||||
public void testJdkIsNotExported() throws Exception {
|
||||
assertClassRoots(orderEntries(myModule).exportedOnly());
|
||||
}
|
||||
|
||||
public void testProject() throws Exception {
|
||||
JpsModuleRootModificationUtil.addDependency(myModule, createJDomLibrary());
|
||||
|
||||
final String srcRoot = addSourceRoot(myModule, false);
|
||||
final String testRoot = addSourceRoot(myModule, true);
|
||||
final String output = setModuleOutput(myModule, false);
|
||||
final String testOutput = setModuleOutput(myModule, true);
|
||||
|
||||
assertClassRoots(orderEntries(myProject).withoutSdk(), testOutput, output, getJDomJar());
|
||||
assertSourceRoots(orderEntries(myProject).withoutSdk(), srcRoot, testRoot, getJDomSources());
|
||||
}
|
||||
|
||||
public void testModules() throws Exception {
|
||||
JpsModuleRootModificationUtil.addDependency(myModule, createJDomLibrary());
|
||||
|
||||
final String srcRoot = addSourceRoot(myModule, false);
|
||||
final String testRoot = addSourceRoot(myModule, true);
|
||||
final String output = setModuleOutput(myModule, false);
|
||||
final String testOutput = setModuleOutput(myModule, true);
|
||||
|
||||
assertClassRoots(JpsJavaExtensionService.getInstance().enumerateDependencies(Arrays.asList(myModule)).withoutSdk(),
|
||||
testOutput, output, getJDomJar());
|
||||
assertSourceRoots(JpsJavaExtensionService.getInstance().enumerateDependencies(Arrays.asList(myModule)).withoutSdk(),
|
||||
srcRoot, testRoot, getJDomSources());
|
||||
}
|
||||
|
||||
private String setModuleOutput(JpsModule module, boolean tests) {
|
||||
try {
|
||||
File file = FileUtil.createTempDirectory(module.getName(), tests ? "testSrc" : "src");
|
||||
JpsJavaModuleExtension extension = JpsJavaExtensionService.getInstance().getOrCreateModuleExtension(module);
|
||||
String url = JpsPathUtil.getLibraryRootUrl(file);
|
||||
if (tests) {
|
||||
extension.setTestOutputUrl(url);
|
||||
}
|
||||
else {
|
||||
extension.setOutputUrl(url);
|
||||
}
|
||||
return url;
|
||||
}
|
||||
catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
private String addSourceRoot(JpsModule module, boolean tests) {
|
||||
try {
|
||||
File file = FileUtil.createTempDirectory(module.getName(), tests ? "testSrc" : "src");
|
||||
return module.addSourceRoot(JpsPathUtil.getLibraryRootUrl(file), tests ? JavaSourceRootType.TEST_SOURCE : JavaSourceRootType.SOURCE).getUrl();
|
||||
}
|
||||
catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
private JpsJavaDependenciesEnumerator orderEntries(JpsProject project) {
|
||||
return JpsJavaExtensionService.dependencies(project);
|
||||
}
|
||||
|
||||
private static JpsJavaDependenciesEnumerator orderEntries(JpsModule module) {
|
||||
return JpsJavaExtensionService.dependencies(module);
|
||||
}
|
||||
|
||||
private static void assertClassRoots(final JpsJavaDependenciesEnumerator enumerator, String... urls) {
|
||||
assertEnumeratorRoots(enumerator.classes(), urls);
|
||||
}
|
||||
|
||||
private static void assertSourceRoots(final JpsJavaDependenciesEnumerator enumerator, String... urls) {
|
||||
assertEnumeratorRoots(enumerator.sources(), urls);
|
||||
}
|
||||
|
||||
private static void assertEnumeratorRoots(JpsJavaDependenciesRootsEnumerator rootsEnumerator, String... urls) {
|
||||
assertOrderedEquals(rootsEnumerator.getUrls(), urls);
|
||||
}
|
||||
}
|
||||
@@ -10,13 +10,13 @@ import org.jetbrains.jps.model.module.JpsModule;
|
||||
*/
|
||||
public class JpsFacetTest extends JpsModelTestCase {
|
||||
public void testAddFacet() {
|
||||
final JpsModule m = myModel.getProject().addModule("m", JpsJavaModuleType.INSTANCE);
|
||||
final JpsModule m = myProject.addModule("m", JpsJavaModuleType.INSTANCE);
|
||||
m.addFacet("f", MY_FACET_TYPE, JpsElementFactory.getInstance().createDummyElement());
|
||||
assertEquals("f", assertOneElement(m.getFacets()).getName());
|
||||
}
|
||||
|
||||
public void testCreateReferenceByFacet() {
|
||||
final JpsFacet facet = myModel.getProject().addModule("m", JpsJavaModuleType.INSTANCE).addFacet("f", MY_FACET_TYPE, JpsElementFactory.getInstance().createDummyElement());
|
||||
final JpsFacet facet = myProject.addModule("m", JpsJavaModuleType.INSTANCE).addFacet("f", MY_FACET_TYPE, JpsElementFactory.getInstance().createDummyElement());
|
||||
final JpsElementReference<JpsFacet> reference = facet.createReference().asExternal(myModel);
|
||||
assertSame(facet, reference.resolve());
|
||||
}
|
||||
|
||||
@@ -6,12 +6,14 @@ import org.jetbrains.jps.model.module.JpsDependencyElement;
|
||||
import org.jetbrains.jps.model.module.JpsLibraryDependency;
|
||||
import org.jetbrains.jps.model.module.JpsModule;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author nik
|
||||
*/
|
||||
public class JpsJavaExtensionTest extends JpsModelTestCase {
|
||||
public class JpsJavaExtensionTest extends JpsJavaModelTestCase {
|
||||
public void testModule() {
|
||||
final JpsModule module = myModel.getProject().addModule("m", JpsJavaModuleType.INSTANCE);
|
||||
final JpsModule module = addModule();
|
||||
final JpsJavaModuleExtension extension = JpsJavaExtensionService.getInstance().getOrCreateModuleExtension(module);
|
||||
extension.setOutputUrl("file://path");
|
||||
JpsJavaModuleExtension moduleExtension = JpsJavaExtensionService.getInstance().getModuleExtension(module);
|
||||
@@ -28,8 +30,9 @@ public class JpsJavaExtensionTest extends JpsModelTestCase {
|
||||
JpsJavaExtensionService.getInstance().getOrCreateDependencyExtension(dependency).setExported(true);
|
||||
model.commit();
|
||||
|
||||
final JpsDependencyElement dep =
|
||||
assertOneElement(assertOneElement(myModel.getProject().getModules()).getDependenciesList().getDependencies());
|
||||
List<JpsDependencyElement> dependencies = assertOneElement(myProject.getModules()).getDependenciesList().getDependencies();
|
||||
assertEquals(2, dependencies.size());
|
||||
final JpsDependencyElement dep = dependencies.get(1);
|
||||
final JpsJavaDependencyExtension extension = JpsJavaExtensionService.getInstance().getDependencyExtension(dep);
|
||||
assertNotNull(extension);
|
||||
assertTrue(extension.isExported());
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
package org.jetbrains.jps.model;
|
||||
|
||||
import org.jetbrains.jps.model.java.JpsJavaLibraryType;
|
||||
import org.jetbrains.jps.model.java.JpsJavaModuleType;
|
||||
import org.jetbrains.jps.model.library.JpsLibrary;
|
||||
import org.jetbrains.jps.model.module.JpsModule;
|
||||
|
||||
/**
|
||||
* @author nik
|
||||
*/
|
||||
public abstract class JpsJavaModelTestCase extends JpsModelTestCase {
|
||||
protected JpsModule addModule() {
|
||||
return addModule("m");
|
||||
}
|
||||
|
||||
protected JpsModule addModule(final String name) {
|
||||
return myProject.addModule(name, JpsJavaModuleType.INSTANCE);
|
||||
}
|
||||
|
||||
protected JpsLibrary addLibrary() {
|
||||
return addLibrary("l");
|
||||
}
|
||||
|
||||
protected JpsLibrary addLibrary(final String name) {
|
||||
return myProject.addLibrary(name, JpsJavaLibraryType.INSTANCE);
|
||||
}
|
||||
}
|
||||
@@ -8,37 +8,37 @@ import org.jetbrains.jps.model.library.*;
|
||||
*/
|
||||
public class JpsLibraryTest extends JpsModelTestCase {
|
||||
public void testAddRoot() {
|
||||
final JpsLibrary library = myModel.getProject().addLibrary("a", JpsJavaLibraryType.INSTANCE);
|
||||
final JpsLibrary library = myProject.addLibrary("a", JpsJavaLibraryType.INSTANCE);
|
||||
library.addRoot("file://my-url", JpsOrderRootType.COMPILED);
|
||||
assertEquals("file://my-url", assertOneElement(library.getRoots(JpsOrderRootType.COMPILED)).getUrl());
|
||||
}
|
||||
|
||||
public void testModifiableCopy() {
|
||||
myModel.getProject().addLibrary("a", JpsJavaLibraryType.INSTANCE);
|
||||
myProject.addLibrary("a", JpsJavaLibraryType.INSTANCE);
|
||||
|
||||
final JpsModel modifiableModel = myModel.createModifiableModel(new TestJpsEventDispatcher());
|
||||
final JpsLibrary modifiable = assertOneElement(modifiableModel.getProject().getLibraryCollection().getLibraries());
|
||||
modifiable.addRoot("file://my-url", JpsOrderRootType.COMPILED);
|
||||
modifiableModel.commit();
|
||||
|
||||
final JpsLibrary library = assertOneElement(myModel.getProject().getLibraryCollection().getLibraries());
|
||||
final JpsLibrary library = assertOneElement(myProject.getLibraryCollection().getLibraries());
|
||||
assertEquals("file://my-url", assertOneElement(library.getRoots(JpsOrderRootType.COMPILED)).getUrl());
|
||||
assertEmpty(library.getRoots(JpsOrderRootType.SOURCES));
|
||||
}
|
||||
|
||||
public void testCreateReferenceByLibrary() {
|
||||
final JpsLibrary library = myModel.getProject().addLibrary("l", JpsJavaLibraryType.INSTANCE);
|
||||
final JpsLibrary library = myProject.addLibrary("l", JpsJavaLibraryType.INSTANCE);
|
||||
final JpsLibraryReference reference = library.createReference().asExternal(myModel);
|
||||
assertEquals("l", reference.getLibraryName());
|
||||
assertSame(library, reference.resolve());
|
||||
}
|
||||
|
||||
public void testCreateReferenceByName() {
|
||||
JpsLibraryReference reference = JpsElementFactory.getInstance().createLibraryReference("l", myModel.getProject().createReference()).asExternal(myModel);
|
||||
JpsLibraryReference reference = JpsElementFactory.getInstance().createLibraryReference("l", myProject.createReference()).asExternal(myModel);
|
||||
assertEquals("l", reference.getLibraryName());
|
||||
assertNull(reference.resolve());
|
||||
|
||||
final JpsLibrary library = myModel.getProject().addLibrary("l", JpsJavaLibraryType.INSTANCE);
|
||||
final JpsLibrary library = myProject.addLibrary("l", JpsJavaLibraryType.INSTANCE);
|
||||
assertSame(library, reference.resolve());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,10 +9,12 @@ import org.jetbrains.jps.model.impl.JpsModelImpl;
|
||||
public abstract class JpsModelTestCase extends UsefulTestCase {
|
||||
protected JpsModel myModel;
|
||||
protected TestJpsEventDispatcher myDispatcher;
|
||||
protected JpsProject myProject;
|
||||
|
||||
public void setUp() throws Exception {
|
||||
super.setUp();
|
||||
myDispatcher = new TestJpsEventDispatcher();
|
||||
myModel = new JpsModelImpl(myDispatcher);
|
||||
myProject = myModel.getProject();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
package org.jetbrains.jps.model;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.jps.model.java.JpsJavaDependencyExtension;
|
||||
import org.jetbrains.jps.model.java.JpsJavaDependencyScope;
|
||||
import org.jetbrains.jps.model.java.JpsJavaExtensionService;
|
||||
import org.jetbrains.jps.model.java.JpsJavaSdkType;
|
||||
import org.jetbrains.jps.model.library.JpsLibrary;
|
||||
import org.jetbrains.jps.model.library.sdk.JpsSdk;
|
||||
import org.jetbrains.jps.model.module.JpsDependencyElement;
|
||||
import org.jetbrains.jps.model.module.JpsModule;
|
||||
|
||||
/**
|
||||
* @author nik
|
||||
*/
|
||||
public class JpsModuleRootModificationUtil {
|
||||
public static void addDependency(JpsModule module, JpsLibrary library) {
|
||||
addDependency(module, library, JpsJavaDependencyScope.COMPILE, false);
|
||||
}
|
||||
|
||||
public static void addDependency(JpsModule module, JpsLibrary library, final JpsJavaDependencyScope scope, final boolean exported) {
|
||||
setDependencyProperties(module.getDependenciesList().addLibraryDependency(library), scope, exported);
|
||||
}
|
||||
|
||||
private static void setDependencyProperties(JpsDependencyElement dependency, JpsJavaDependencyScope scope, boolean exported) {
|
||||
JpsJavaDependencyExtension extension = JpsJavaExtensionService.getInstance().getOrCreateDependencyExtension(dependency);
|
||||
extension.setExported(exported);
|
||||
extension.setScope(scope);
|
||||
}
|
||||
|
||||
public static void setModuleSdk(JpsModule module, @Nullable JpsSdk<JpsDummyElement> sdk) {
|
||||
module.getSdkReferencesTable().setSdkReference(JpsJavaSdkType.INSTANCE, sdk != null ? sdk.createReference() : null);
|
||||
}
|
||||
|
||||
public static void setSdkInherited(JpsModule module) {
|
||||
module.getSdkReferencesTable().setSdkReference(JpsJavaSdkType.INSTANCE, null);
|
||||
}
|
||||
|
||||
public static void addDependency(final JpsModule from, final JpsModule to) {
|
||||
addDependency(from, to, JpsJavaDependencyScope.COMPILE, false);
|
||||
}
|
||||
|
||||
public static void addDependency(final JpsModule from, final JpsModule to, final JpsJavaDependencyScope scope, final boolean exported) {
|
||||
setDependencyProperties(from.getDependenciesList().addModuleDependency(to), scope, exported);
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@ import java.util.List;
|
||||
*/
|
||||
public class JpsModuleTest extends JpsModelTestCase {
|
||||
public void testAddSourceRoot() {
|
||||
final JpsModule module = myModel.getProject().addModule("m", JpsJavaModuleType.INSTANCE);
|
||||
final JpsModule module = myProject.addModule("m", JpsJavaModuleType.INSTANCE);
|
||||
JpsSimpleElement<JavaSourceRootProperties> properties = JpsElementFactory.getInstance().createSimpleElement(
|
||||
new JavaSourceRootProperties("com.xxx"));
|
||||
final JpsModuleSourceRoot sourceRoot = module.addSourceRoot("file://url", JavaSourceRootType.SOURCE, properties);
|
||||
@@ -29,14 +29,14 @@ public class JpsModuleTest extends JpsModelTestCase {
|
||||
}
|
||||
|
||||
public void testGetModulesOfType() {
|
||||
JpsProject project = myModel.getProject();
|
||||
JpsProject project = myProject;
|
||||
JpsModule module = project.addModule("m", JpsJavaModuleType.INSTANCE);
|
||||
Iterable<JpsTypedModule<JpsDummyElement>> modules = project.getModules(JpsJavaModuleType.INSTANCE);
|
||||
assertSameElements(ContainerUtil.newArrayList(modules), module);
|
||||
}
|
||||
|
||||
public void testModifiableModel() {
|
||||
final JpsModule module = myModel.getProject().addModule("m", JpsJavaModuleType.INSTANCE);
|
||||
final JpsModule module = myProject.addModule("m", JpsJavaModuleType.INSTANCE);
|
||||
final JpsModuleSourceRoot root0 = module.addSourceRoot("url1", JavaSourceRootType.SOURCE);
|
||||
myDispatcher.clear();
|
||||
|
||||
@@ -58,38 +58,41 @@ public class JpsModuleTest extends JpsModelTestCase {
|
||||
}
|
||||
|
||||
public void testAddDependency() {
|
||||
final JpsModule module = myModel.getProject().addModule("m", JpsJavaModuleType.INSTANCE);
|
||||
final JpsLibrary library = myModel.getProject().addLibrary("l", JpsJavaLibraryType.INSTANCE);
|
||||
final JpsModule dep = myModel.getProject().addModule("dep", JpsJavaModuleType.INSTANCE);
|
||||
final JpsModule module = myProject.addModule("m", JpsJavaModuleType.INSTANCE);
|
||||
final JpsLibrary library = myProject.addLibrary("l", JpsJavaLibraryType.INSTANCE);
|
||||
final JpsModule dep = myProject.addModule("dep", JpsJavaModuleType.INSTANCE);
|
||||
module.getDependenciesList().addLibraryDependency(library);
|
||||
module.getDependenciesList().addModuleDependency(dep);
|
||||
|
||||
final List<? extends JpsDependencyElement> dependencies = module.getDependenciesList().getDependencies();
|
||||
assertEquals(2, dependencies.size());
|
||||
assertSame(library, assertInstanceOf(dependencies.get(0), JpsLibraryDependency.class).getLibrary());
|
||||
assertSame(dep, assertInstanceOf(dependencies.get(1), JpsModuleDependency.class).getModule());
|
||||
assertEquals(3, dependencies.size());
|
||||
assertInstanceOf(dependencies.get(0), JpsModuleSourceDependency.class);
|
||||
assertSame(library, assertInstanceOf(dependencies.get(1), JpsLibraryDependency.class).getLibrary());
|
||||
assertSame(dep, assertInstanceOf(dependencies.get(2), JpsModuleDependency.class).getModule());
|
||||
}
|
||||
|
||||
public void testChangeElementInModifiableModel() {
|
||||
final JpsModule module = myModel.getProject().addModule("m", JpsJavaModuleType.INSTANCE);
|
||||
final JpsModule dep = myModel.getProject().addModule("dep", JpsJavaModuleType.INSTANCE);
|
||||
final JpsLibrary library = myModel.getProject().addLibrary("l", JpsJavaLibraryType.INSTANCE);
|
||||
final JpsModule module = myProject.addModule("m", JpsJavaModuleType.INSTANCE);
|
||||
final JpsModule dep = myProject.addModule("dep", JpsJavaModuleType.INSTANCE);
|
||||
final JpsLibrary library = myProject.addLibrary("l", JpsJavaLibraryType.INSTANCE);
|
||||
module.getDependenciesList().addLibraryDependency(library);
|
||||
myDispatcher.clear();
|
||||
|
||||
final JpsModel modifiableModel = myModel.createModifiableModel(new TestJpsEventDispatcher());
|
||||
final JpsModule m = modifiableModel.getProject().getModules().get(0);
|
||||
assertEquals("m", m.getName());
|
||||
m.getDependenciesList().getDependencies().get(0).remove();
|
||||
m.getDependenciesList().getDependencies().get(1).remove();
|
||||
m.getDependenciesList().addModuleDependency(dep);
|
||||
modifiableModel.commit();
|
||||
assertOneElement(myDispatcher.retrieveRemoved(JpsLibraryDependency.class));
|
||||
assertSame(dep, assertOneElement(myDispatcher.retrieveAdded(JpsModuleDependency.class)).getModuleReference().resolve());
|
||||
assertSame(dep, assertInstanceOf(assertOneElement(module.getDependenciesList().getDependencies()), JpsModuleDependency.class).getModuleReference().resolve());
|
||||
List<JpsDependencyElement> dependencies = module.getDependenciesList().getDependencies();
|
||||
assertEquals(2, dependencies.size());
|
||||
assertSame(dep, assertInstanceOf(dependencies.get(1), JpsModuleDependency.class).getModuleReference().resolve());
|
||||
}
|
||||
|
||||
public void testCreateReferenceByModule() {
|
||||
final JpsModule module = myModel.getProject().addModule("m", JpsJavaModuleType.INSTANCE);
|
||||
final JpsModule module = myProject.addModule("m", JpsJavaModuleType.INSTANCE);
|
||||
final JpsModuleReference reference = module.createReference().asExternal(myModel);
|
||||
assertEquals("m", reference.getModuleName());
|
||||
assertSame(module, reference.resolve());
|
||||
@@ -100,17 +103,19 @@ public class JpsModuleTest extends JpsModelTestCase {
|
||||
assertEquals("m", reference.getModuleName());
|
||||
assertNull(reference.resolve());
|
||||
|
||||
final JpsModule module = myModel.getProject().addModule("m", JpsJavaModuleType.INSTANCE);
|
||||
final JpsModule module = myProject.addModule("m", JpsJavaModuleType.INSTANCE);
|
||||
assertSame(module, reference.resolve());
|
||||
}
|
||||
|
||||
public void testSdkDependency() {
|
||||
JpsSdk<JpsDummyElement> sdk = myModel.getGlobal().addSdk("sdk", null, null, JpsJavaSdkType.INSTANCE).getProperties();
|
||||
final JpsModule module = myModel.getProject().addModule("m", JpsJavaModuleType.INSTANCE);
|
||||
final JpsModule module = myProject.addModule("m", JpsJavaModuleType.INSTANCE);
|
||||
module.getSdkReferencesTable().setSdkReference(JpsJavaSdkType.INSTANCE, sdk.createReference());
|
||||
module.getDependenciesList().addSdkDependency(JpsJavaSdkType.INSTANCE);
|
||||
|
||||
final JpsSdkDependency dependency = assertInstanceOf(assertOneElement(module.getDependenciesList().getDependencies()), JpsSdkDependency.class);
|
||||
List<JpsDependencyElement> dependencies = module.getDependenciesList().getDependencies();
|
||||
assertEquals(2, dependencies.size());
|
||||
final JpsSdkDependency dependency = assertInstanceOf(dependencies.get(1), JpsSdkDependency.class);
|
||||
assertSame(sdk.getParent(), dependency.resolveSdk());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,6 +65,7 @@ public class JpsModuleSerializer {
|
||||
}
|
||||
|
||||
final JpsDependenciesList dependenciesList = module.getDependenciesList();
|
||||
dependenciesList.clear();
|
||||
final JpsElementFactory elementFactory = JpsElementFactory.getInstance();
|
||||
int moduleLibraryNum = 0;
|
||||
for (Element orderEntry : getChildren(rootModelComponent, ORDER_ENTRY_TAG)) {
|
||||
|
||||
@@ -163,7 +163,9 @@ public class JpsProjectLoader extends JpsLoaderBase {
|
||||
final JpsModulePropertiesSerializer<?> serializer = getModulePropertiesSerializer(typeId);
|
||||
final JpsModule module = createModule(name, moduleRoot, serializer);
|
||||
JpsModuleSerializer.loadRootModel(module, JDomSerializationUtil.findComponent(moduleRoot, "NewModuleRootManager"), projectSdkType);
|
||||
JpsFacetSerializer.loadFacets(module, JDomSerializationUtil.findComponent(moduleRoot, "FacetManager"), FileUtil.toSystemIndependentName(path));
|
||||
final String moduleDirPath = file.getParent();
|
||||
JpsFacetSerializer.loadFacets(module, JDomSerializationUtil.findComponent(moduleRoot, "FacetManager"),
|
||||
FileUtil.toSystemIndependentName(moduleDirPath));
|
||||
return module;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ import static org.jetbrains.jps.model.serialization.JpsProjectSerializationTest.
|
||||
public class JpsArtifactSerializationTest extends JpsSerializationTestCase {
|
||||
public void testLoadProject() {
|
||||
loadProject(SAMPLE_PROJECT_PATH);
|
||||
List<JpsArtifact> artifacts = getService().getSortedArtifacts(myModel.getProject());
|
||||
List<JpsArtifact> artifacts = getService().getSortedArtifacts(myProject);
|
||||
assertEquals(2, artifacts.size());
|
||||
assertEquals("dir", artifacts.get(0).getName());
|
||||
assertEquals("jar", artifacts.get(1).getName());
|
||||
|
||||
@@ -22,14 +22,14 @@ public class JpsProjectSerializationTest extends JpsSerializationTestCase {
|
||||
|
||||
public void testLoadProject() {
|
||||
loadProject(SAMPLE_PROJECT_PATH);
|
||||
List<JpsModule> modules = myModel.getProject().getModules();
|
||||
List<JpsModule> modules = myProject.getModules();
|
||||
assertEquals(2, modules.size());
|
||||
JpsModule main = modules.get(0);
|
||||
assertEquals("main", main.getName());
|
||||
JpsModule util = modules.get(1);
|
||||
assertEquals("util", util.getName());
|
||||
|
||||
List<JpsLibrary> libraries = myModel.getProject().getLibraryCollection().getLibraries();
|
||||
List<JpsLibrary> libraries = myProject.getLibraryCollection().getLibraries();
|
||||
assertEquals(3, libraries.size());
|
||||
|
||||
List<JpsDependencyElement> dependencies = util.getDependenciesList().getDependencies();
|
||||
@@ -51,17 +51,17 @@ public class JpsProjectSerializationTest extends JpsSerializationTestCase {
|
||||
|
||||
public void testSaveProject() {
|
||||
loadProject(SAMPLE_PROJECT_PATH);
|
||||
JpsModule main = myModel.getProject().getModules().get(0);
|
||||
JpsModule main = myProject.getModules().get(0);
|
||||
doTestSaveModule(main, "main.iml");
|
||||
|
||||
JpsModule util = myModel.getProject().getModules().get(1);
|
||||
JpsModule util = myProject.getModules().get(1);
|
||||
doTestSaveModule(util, "util/util.iml");
|
||||
|
||||
File[] libs = getFileInSampleProject(".idea/libraries").listFiles();
|
||||
assertNotNull(libs);
|
||||
for (File libFile : libs) {
|
||||
String libName = FileUtil.getNameWithoutExtension(libFile);
|
||||
JpsLibrary library = myModel.getProject().getLibraryCollection().findLibrary(libName);
|
||||
JpsLibrary library = myProject.getLibraryCollection().findLibrary(libName);
|
||||
assertNotNull(libName, library);
|
||||
doTestSaveLibrary(libFile, libName, library);
|
||||
}
|
||||
@@ -102,7 +102,7 @@ public class JpsProjectSerializationTest extends JpsSerializationTestCase {
|
||||
|
||||
public void _testLoadIdeaProject() {
|
||||
long start = System.currentTimeMillis();
|
||||
final JpsProject project = myModel.getProject();
|
||||
final JpsProject project = myProject;
|
||||
loadProject("");
|
||||
assertTrue(project.getModules().size() > 0);
|
||||
System.out.println("Time: " + (System.currentTimeMillis() - start));
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package org.jetbrains.jps.model.serialization;
|
||||
|
||||
import com.intellij.openapi.application.PathManager;
|
||||
import com.intellij.openapi.application.ex.PathManagerEx;
|
||||
import com.intellij.openapi.util.io.FileUtilRt;
|
||||
import com.intellij.openapi.vfs.VfsUtilCore;
|
||||
import com.intellij.util.PathUtil;
|
||||
@@ -25,7 +25,7 @@ public abstract class JpsSerializationTestCase extends JpsModelTestCase {
|
||||
myProjectHomePath = PathUtil.getParentPath(myProjectHomePath);
|
||||
}
|
||||
try {
|
||||
JpsProjectLoader.loadProject(myModel.getProject(), Collections.<String, String>emptyMap(), path);
|
||||
JpsProjectLoader.loadProject(myProject, Collections.<String, String>emptyMap(), path);
|
||||
}
|
||||
catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
@@ -47,19 +47,11 @@ public abstract class JpsSerializationTestCase extends JpsModelTestCase {
|
||||
}
|
||||
|
||||
protected static String getTestDataFileAbsolutePath(String relativePath) {
|
||||
File baseDir = new File(PathManager.getHomePath());
|
||||
File file = new File(baseDir, FileUtilRt.toSystemDependentName(relativePath));
|
||||
if (!file.exists()) {
|
||||
final File communityDir = new File(baseDir, "community");
|
||||
if (communityDir.exists()) {
|
||||
file = new File(communityDir, FileUtilRt.toSystemDependentName(relativePath));
|
||||
}
|
||||
}
|
||||
return FileUtilRt.toSystemDependentName(file.getAbsolutePath());
|
||||
return PathManagerEx.findFileUnderCommunityHome(relativePath).getAbsolutePath();
|
||||
}
|
||||
|
||||
protected static Element loadModuleRootTag(File imlFile) {
|
||||
return JpsLoaderBase
|
||||
.loadRootElement(imlFile, JpsProjectLoader.createModuleMacroExpander(Collections.<String, String>emptyMap(), imlFile));
|
||||
JpsMacroExpander expander = JpsProjectLoader.createModuleMacroExpander(Collections.<String, String>emptyMap(), imlFile);
|
||||
return JpsLoaderBase.loadRootElement(imlFile, expander);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
/*
|
||||
* Copyright 2000-2012 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.codeInsight.template.impl;
|
||||
|
||||
import com.intellij.openapi.components.PersistentStateComponent;
|
||||
|
||||
import com.intellij.openapi.components.State;
|
||||
import com.intellij.openapi.components.Storage;
|
||||
import com.intellij.openapi.components.StoragePathMacros;
|
||||
import com.intellij.util.xmlb.XmlSerializer;
|
||||
import org.jdom.Element;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* Contains exportable part of TemplateSettings (can be shared via export/import settings).
|
||||
* @author Rustam Vishnyakov
|
||||
*/
|
||||
@State(
|
||||
name="ExportableTemplateSettings",
|
||||
storages= {
|
||||
@Storage(
|
||||
file = StoragePathMacros.APP_CONFIG + "/" + ExportableTemplateSettings.EXPORTABLE_SETTINGS_FILE
|
||||
)}
|
||||
)
|
||||
public class ExportableTemplateSettings implements PersistentStateComponent<Element> {
|
||||
|
||||
public final static String EXPORTABLE_SETTINGS_FILE = "template.settings.xml";
|
||||
|
||||
private Collection<TemplateSettings.TemplateKey> deletedKeys = new ArrayList<TemplateSettings.TemplateKey>();
|
||||
private boolean isLoaded = false;
|
||||
private TemplateSettings parentSettings;
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public Element getState() {
|
||||
if (parentSettings != null) {
|
||||
this.deletedKeys.clear();
|
||||
this.deletedKeys.addAll(parentSettings.getDeletedTemplates());
|
||||
}
|
||||
return XmlSerializer.serialize(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadState(Element state) {
|
||||
XmlSerializer.deserializeInto(this, state);
|
||||
isLoaded = true;
|
||||
}
|
||||
|
||||
public boolean isLoaded() {
|
||||
return isLoaded;
|
||||
}
|
||||
|
||||
@SuppressWarnings("UnusedDeclaration") // Property via reflection
|
||||
public Collection<TemplateSettings.TemplateKey> getDeletedKeys() {
|
||||
return deletedKeys;
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("UnusedDeclaration") // Property via reflection
|
||||
public void setDeletedKeys(Collection<TemplateSettings.TemplateKey> deletedKeys) {
|
||||
this.deletedKeys = deletedKeys;
|
||||
}
|
||||
|
||||
void setParentSettings(TemplateSettings settings) {
|
||||
parentSettings = settings;
|
||||
}
|
||||
}
|
||||
@@ -112,9 +112,12 @@ public class TemplateSettings implements PersistentStateComponent<Element>, Expo
|
||||
private final SchemesManager<TemplateGroup, TemplateGroup> mySchemesManager;
|
||||
private static final String FILE_SPEC = "$ROOT_CONFIG$/templates";
|
||||
|
||||
private static class TemplateKey {
|
||||
final String groupName;
|
||||
final String key;
|
||||
public static class TemplateKey {
|
||||
private String groupName;
|
||||
private String key;
|
||||
|
||||
@SuppressWarnings("UnusedDeclaration")
|
||||
public TemplateKey() {}
|
||||
|
||||
private TemplateKey(String groupName, String key) {
|
||||
this.groupName = groupName;
|
||||
@@ -142,6 +145,24 @@ public class TemplateSettings implements PersistentStateComponent<Element>, Expo
|
||||
result = 31 * result + (key != null ? key.hashCode() : 0);
|
||||
return result;
|
||||
}
|
||||
|
||||
public String getGroupName() {
|
||||
return groupName;
|
||||
}
|
||||
|
||||
@SuppressWarnings("UnusedDeclaration")
|
||||
public void setGroupName(String groupName) {
|
||||
this.groupName = groupName;
|
||||
}
|
||||
|
||||
public String getKey() {
|
||||
return key;
|
||||
}
|
||||
|
||||
public void setKey(String key) {
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private TemplateKey myLastSelectedTemplate;
|
||||
@@ -213,7 +234,9 @@ public class TemplateSettings implements PersistentStateComponent<Element>, Expo
|
||||
|
||||
@NotNull
|
||||
public File[] getExportFiles() {
|
||||
return new File[]{getTemplateDirectory(true),PathManager.getDefaultOptionsFile()};
|
||||
File exportableSettingsFile =
|
||||
new File(PathManager.getOptionsPath() + File.separator + ExportableTemplateSettings.EXPORTABLE_SETTINGS_FILE);
|
||||
return new File[]{getTemplateDirectory(true), exportableSettingsFile };
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@@ -238,12 +261,20 @@ public class TemplateSettings implements PersistentStateComponent<Element>, Expo
|
||||
}
|
||||
}
|
||||
|
||||
Element deleted = parentNode.getChild(DELETED_TEMPLATES);
|
||||
if (deleted != null) {
|
||||
List children = deleted.getChildren();
|
||||
for (final Object aChildren : children) {
|
||||
Element child = (Element)aChildren;
|
||||
myDeletedTemplates.add(new TemplateKey(child.getAttributeValue(GROUP), child.getAttributeValue(NAME)));
|
||||
ExportableTemplateSettings exportableSettings = ServiceManager.getService(ExportableTemplateSettings.class);
|
||||
assert exportableSettings != null : "Can't find required ExportablTemplateSettings service.";
|
||||
exportableSettings.setParentSettings(this);
|
||||
if (exportableSettings.isLoaded()) {
|
||||
myDeletedTemplates.addAll(exportableSettings.getDeletedKeys());
|
||||
}
|
||||
else {
|
||||
Element deleted = parentNode.getChild(DELETED_TEMPLATES);
|
||||
if (deleted != null) {
|
||||
List children = deleted.getChildren();
|
||||
for (final Object aChildren : children) {
|
||||
Element child = (Element)aChildren;
|
||||
myDeletedTemplates.add(new TemplateKey(child.getAttributeValue(GROUP), child.getAttributeValue(NAME)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -277,20 +308,6 @@ public class TemplateSettings implements PersistentStateComponent<Element>, Expo
|
||||
}
|
||||
parentNode.addContent(element);
|
||||
|
||||
if (myDeletedTemplates.size() > 0) {
|
||||
Element deleted = new Element(DELETED_TEMPLATES);
|
||||
for (final TemplateKey deletedTemplate : myDeletedTemplates) {
|
||||
if (deletedTemplate.key != null) {
|
||||
Element template = new Element(TEMPLATE);
|
||||
template.setAttribute(NAME, deletedTemplate.key);
|
||||
if (deletedTemplate.groupName != null) {
|
||||
template.setAttribute(GROUP, deletedTemplate.groupName);
|
||||
}
|
||||
deleted.addContent(template);
|
||||
}
|
||||
}
|
||||
parentNode.addContent(deleted);
|
||||
}
|
||||
return parentNode;
|
||||
}
|
||||
|
||||
@@ -713,4 +730,8 @@ public class TemplateSettings implements PersistentStateComponent<Element>, Expo
|
||||
return c;
|
||||
}
|
||||
}
|
||||
|
||||
public List<TemplateKey> getDeletedTemplates() {
|
||||
return myDeletedTemplates;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -285,7 +285,7 @@ public class ModuleImpl extends ComponentManagerImpl implements ModuleEx {
|
||||
@SuppressWarnings({"HardCodedStringLiteral"})
|
||||
public String toString() {
|
||||
if (myName == null) return "Module (not initialized)";
|
||||
return "Module: '" + getName();
|
||||
return "Module: '" + getName() + "'";
|
||||
}
|
||||
|
||||
private static String moduleNameByFileName(@NotNull String fileName) {
|
||||
|
||||
@@ -56,7 +56,10 @@ public class HyperlinkLabel extends HighlightableComponent {
|
||||
}
|
||||
|
||||
public HyperlinkLabel(String text) {
|
||||
this(text, Color.BLUE, UIUtil.getLabelBackground(), Color.BLUE);
|
||||
this(text,
|
||||
UIUtil.isUnderDarcula() ? DarculaColors.BLUE : Color.BLUE,
|
||||
UIUtil.getLabelBackground(),
|
||||
UIUtil.isUnderDarcula() ? DarculaColors.BLUE : Color.BLUE);
|
||||
}
|
||||
|
||||
public HyperlinkLabel(String text, final Color textForegroundColor, final Color textBackgroundColor, final Color textEffectColor) {
|
||||
|
||||
@@ -34,7 +34,7 @@ import com.intellij.openapi.wm.IdeFocusManager;
|
||||
import com.intellij.openapi.wm.ex.IdeFocusTraversalPolicy;
|
||||
import com.intellij.ui.*;
|
||||
import com.intellij.ui.table.JBTable;
|
||||
import com.intellij.util.NullableFunction;
|
||||
import com.intellij.util.PairFunction;
|
||||
import com.intellij.util.ThrowableRunnable;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -112,12 +112,12 @@ public abstract class PropertyTable extends JBTable {
|
||||
|
||||
addMouseListener(new MouseTableListener());
|
||||
|
||||
mySpeedSearch = new TableSpeedSearch(this, new NullableFunction<Pair<Object, Cell>, String>() {
|
||||
mySpeedSearch = new TableSpeedSearch(this, new PairFunction<Object, Cell, String>() {
|
||||
@Override
|
||||
public String fun(Pair<Object, Cell> pair) {
|
||||
if (pair.second.column != 0) return null;
|
||||
if (pair.first instanceof GroupProperty) return null;
|
||||
return ((Property)pair.first).getName();
|
||||
public String fun(Object object, Cell cell) {
|
||||
if (cell.column != 0) return null;
|
||||
if (object instanceof GroupProperty) return null;
|
||||
return ((Property)object).getName();
|
||||
}
|
||||
}) {
|
||||
@Override
|
||||
@@ -1250,7 +1250,7 @@ public abstract class PropertyTable extends JBTable {
|
||||
}
|
||||
|
||||
SearchUtil.appendFragments(mySpeedSearch.getEnteredPrefix(), property.getName(),
|
||||
attr.getStyle(), attr.getFgColor(), attr.getBgColor(), renderer);
|
||||
attr.getStyle(), attr.getFgColor(), attr.getBgColor(), renderer);
|
||||
|
||||
Icon icon = UIUtil.getTreeNodeIcon(isExpanded(property), selected, tableHasFocus);
|
||||
boolean hasChildren = !getChildren(property).isEmpty();
|
||||
|
||||
@@ -33,6 +33,7 @@ ToggleButton.foreground=cccccc
|
||||
Separator.background=444444
|
||||
Separator.foreground=888888
|
||||
|
||||
Label.background=404040
|
||||
Label.foreground=cccccc
|
||||
Focus.color=ff0000
|
||||
|
||||
|
||||
@@ -38,9 +38,8 @@ import com.intellij.openapi.editor.event.DocumentEvent;
|
||||
import com.intellij.openapi.editor.ex.DocumentEx;
|
||||
import com.intellij.openapi.editor.ex.EditorSettingsExternalizable;
|
||||
import com.intellij.openapi.extensions.Extensions;
|
||||
import com.intellij.openapi.fileEditor.FileDocumentManager;
|
||||
import com.intellij.openapi.fileEditor.FileDocumentManagerListener;
|
||||
import com.intellij.openapi.fileEditor.FileDocumentSynchronizationVetoer;
|
||||
import com.intellij.openapi.fileEditor.*;
|
||||
import com.intellij.openapi.fileEditor.impl.text.TextEditorImpl;
|
||||
import com.intellij.openapi.fileTypes.BinaryFileTypeDecompilers;
|
||||
import com.intellij.openapi.fileTypes.FileType;
|
||||
import com.intellij.openapi.project.*;
|
||||
@@ -48,6 +47,7 @@ import com.intellij.openapi.project.ex.ProjectEx;
|
||||
import com.intellij.openapi.ui.DialogBuilder;
|
||||
import com.intellij.openapi.ui.DialogWrapper;
|
||||
import com.intellij.openapi.ui.Messages;
|
||||
import com.intellij.openapi.util.Comparing;
|
||||
import com.intellij.openapi.util.Key;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
@@ -361,9 +361,7 @@ public class FileDocumentManagerImpl extends FileDocumentManager implements Appl
|
||||
VirtualFile file = getFile(document);
|
||||
|
||||
if (file == null || !file.isValid() || file instanceof LightVirtualFile || !isFileModified(file)) {
|
||||
myUnsavedDocuments.remove(document);
|
||||
fireUnsavedDocumentsDropped();
|
||||
LOG.assertTrue(!myUnsavedDocuments.contains(document));
|
||||
removeFromUnsaved(document);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -373,6 +371,15 @@ public class FileDocumentManagerImpl extends FileDocumentManager implements Appl
|
||||
if (!file.isValid()) return;
|
||||
}
|
||||
|
||||
if (!isSaveNeeded(document, file)) {
|
||||
if (document instanceof DocumentEx) {
|
||||
((DocumentEx)document).setModificationStamp(file.getModificationStamp());
|
||||
}
|
||||
removeFromUnsaved(document);
|
||||
updateModifiedProperty(file);
|
||||
return;
|
||||
}
|
||||
|
||||
for (FileDocumentSynchronizationVetoer vetoer : Extensions.getExtensions(FileDocumentSynchronizationVetoer.EP_NAME)) {
|
||||
if (!vetoer.maySaveDocument(document)) {
|
||||
return;
|
||||
@@ -403,6 +410,30 @@ public class FileDocumentManagerImpl extends FileDocumentManager implements Appl
|
||||
myTrailingSpacesStripper.clearLineModificationFlags(document);
|
||||
}
|
||||
|
||||
private static void updateModifiedProperty(@NotNull VirtualFile file) {
|
||||
for (Project project : ProjectManager.getInstance().getOpenProjects()) {
|
||||
FileEditorManager fileEditorManager = FileEditorManager.getInstance(project);
|
||||
for (FileEditor editor : fileEditorManager.getAllEditors(file)) {
|
||||
if (editor instanceof TextEditorImpl) {
|
||||
((TextEditorImpl)editor).updateModifiedProperty();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void removeFromUnsaved(@NotNull Document document) {
|
||||
myUnsavedDocuments.remove(document);
|
||||
fireUnsavedDocumentsDropped();
|
||||
LOG.assertTrue(!myUnsavedDocuments.contains(document));
|
||||
}
|
||||
|
||||
private static boolean isSaveNeeded(@NotNull Document document, @NotNull VirtualFile file) {
|
||||
if (file.getFileType().isBinary() || document.getTextLength() > 1000 * 1000) { // don't compare if the file is too big
|
||||
return true;
|
||||
}
|
||||
return !Comparing.equal(document.getCharsSequence(), LoadTextUtil.loadText(file));
|
||||
}
|
||||
|
||||
private static boolean needsRefresh(final VirtualFile file) {
|
||||
final VirtualFileSystem fs = file.getFileSystem();
|
||||
return fs instanceof NewVirtualFileSystem && file.getTimeStamp() != ((NewVirtualFileSystem)fs).getTimeStamp(file);
|
||||
|
||||
@@ -208,7 +208,7 @@ class TextEditorComponent extends JBLoadingPanel implements DataProvider{
|
||||
/**
|
||||
* Updates "modified" property and fires event if necessary
|
||||
*/
|
||||
private void updateModifiedProperty(){
|
||||
void updateModifiedProperty(){
|
||||
Boolean oldModified=Boolean.valueOf(myModified);
|
||||
myModified = isModifiedImpl();
|
||||
myTextEditor.firePropertyChange(FileEditor.PROP_MODIFIED, oldModified, Boolean.valueOf(myModified));
|
||||
|
||||
@@ -107,6 +107,10 @@ public class TextEditorImpl extends UserDataHolderBase implements TextEditor {
|
||||
myComponent.deselectNotify();
|
||||
}
|
||||
|
||||
public void updateModifiedProperty() {
|
||||
myComponent.updateModifiedProperty();
|
||||
}
|
||||
|
||||
void firePropertyChange(final String propertyName, final Object oldValue, final Object newValue) {
|
||||
myChangeSupport.firePropertyChange(propertyName, oldValue, newValue);
|
||||
}
|
||||
|
||||
@@ -45,6 +45,8 @@ import org.jetbrains.annotations.TestOnly;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.concurrent.locks.ReadWriteLock;
|
||||
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||
|
||||
/**
|
||||
* @author max
|
||||
@@ -54,10 +56,12 @@ public class PersistentFSImpl extends PersistentFS implements ApplicationCompone
|
||||
|
||||
private final MessageBus myEventsBus;
|
||||
|
||||
@NotNull private final Map<String, VirtualFileSystemEntry> myRoots = new THashMap<String, VirtualFileSystemEntry>(FileUtil.PATH_HASHING_STRATEGY);
|
||||
@NotNull private final TIntObjectHashMap<VirtualFileSystemEntry> myRootsById = new TIntObjectHashMap<VirtualFileSystemEntry>();
|
||||
private final ReadWriteLock myRootsLock = new ReentrantReadWriteLock();
|
||||
private final Map<String, VirtualFileSystemEntry> myRoots = new THashMap<String, VirtualFileSystemEntry>(FileUtil.PATH_HASHING_STRATEGY);
|
||||
private final TIntObjectHashMap<VirtualFileSystemEntry> myRootsById = new TIntObjectHashMap<VirtualFileSystemEntry>();
|
||||
@Nullable private VirtualFileSystemEntry myFakeRoot;
|
||||
@NotNull private final Object INPUT_LOCK = new Object();
|
||||
|
||||
private final Object myInputLock = new Object();
|
||||
|
||||
public PersistentFSImpl(@NotNull final MessageBus bus) {
|
||||
myEventsBus = bus;
|
||||
@@ -487,7 +491,7 @@ public class PersistentFSImpl extends PersistentFS implements ApplicationCompone
|
||||
|
||||
InputStream contentStream = null;
|
||||
boolean reloadFromDelegate;
|
||||
synchronized (INPUT_LOCK) {
|
||||
synchronized (myInputLock) {
|
||||
reloadFromDelegate = mustReloadContent(canonicalFile) || (contentStream = readContent(canonicalFile)) == null;
|
||||
}
|
||||
|
||||
@@ -504,7 +508,7 @@ public class PersistentFSImpl extends PersistentFS implements ApplicationCompone
|
||||
// do not cache archive content unless asked
|
||||
(cacheContent && !application.isInternal() && !application.isUnitTestMode())) &&
|
||||
content.length <= PersistentFSConstants.FILE_LENGTH_TO_CACHE_THRESHOLD) {
|
||||
synchronized (INPUT_LOCK) {
|
||||
synchronized (myInputLock) {
|
||||
writeContent(canonicalFile, new ByteSequence(content), delegate.isReadOnly());
|
||||
setFlag(canonicalFile, MUST_RELOAD_CONTENT, false);
|
||||
}
|
||||
@@ -536,7 +540,7 @@ public class PersistentFSImpl extends PersistentFS implements ApplicationCompone
|
||||
@NotNull
|
||||
public InputStream getInputStream(@NotNull final VirtualFile file) throws IOException {
|
||||
final VirtualFile canonicalFile = getCanonicalFile(file);
|
||||
synchronized (INPUT_LOCK) {
|
||||
synchronized (myInputLock) {
|
||||
InputStream contentStream;
|
||||
if (mustReloadContent(canonicalFile) || (contentStream = readContent(canonicalFile)) == null) {
|
||||
final NewVirtualFileSystem delegate = getDelegate(canonicalFile);
|
||||
@@ -586,7 +590,7 @@ public class PersistentFSImpl extends PersistentFS implements ApplicationCompone
|
||||
@NotNull VirtualFile file,
|
||||
boolean readOnly, @NotNull byte[] bytes, int bytesLength)
|
||||
throws IOException {
|
||||
synchronized (INPUT_LOCK) {
|
||||
synchronized (myInputLock) {
|
||||
if (bytesLength == fileLength) {
|
||||
writeContent(file, new ByteSequence(bytes, 0, bytesLength), readOnly);
|
||||
setFlag(file, MUST_RELOAD_CONTENT, false);
|
||||
@@ -742,74 +746,83 @@ public class PersistentFSImpl extends PersistentFS implements ApplicationCompone
|
||||
publisher.after(events);
|
||||
}
|
||||
|
||||
@NotNull private static final Object LOCK = new Object(); // TODO: read/write locks instead of synchronized
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public VirtualFileSystemEntry findRoot(@NotNull String basePath, @NotNull NewVirtualFileSystem fs) {
|
||||
final String rootUrl = fs.getProtocol() + "://" + basePath;
|
||||
synchronized (LOCK) {
|
||||
|
||||
myRootsLock.readLock().lock();
|
||||
try {
|
||||
final VirtualFileSystemEntry root = basePath.isEmpty() ? myFakeRoot : myRoots.get(rootUrl);
|
||||
if (root != null) return root;
|
||||
}
|
||||
finally {
|
||||
myRootsLock.readLock().unlock();
|
||||
}
|
||||
|
||||
myRootsLock.writeLock().lock();
|
||||
try {
|
||||
VirtualFileSystemEntry root = basePath.isEmpty() ? myFakeRoot : myRoots.get(rootUrl);
|
||||
if (root != null) return root;
|
||||
|
||||
if (root == null) {
|
||||
try {
|
||||
final int rootId = FSRecords.findRootRecord(rootUrl);
|
||||
final int rootId = FSRecords.findRootRecord(rootUrl);
|
||||
|
||||
if (basePath.isEmpty()) {
|
||||
// fake super-root
|
||||
root = new VirtualDirectoryImpl("", null, fs, rootId) {
|
||||
@SuppressWarnings("NonSynchronizedMethodOverridesSynchronizedMethod")
|
||||
@Override
|
||||
@NotNull
|
||||
public VirtualFile[] getChildren() {
|
||||
return getRoots(getFileSystem());
|
||||
}
|
||||
|
||||
@Override
|
||||
public VirtualFileSystemEntry findChild(@NotNull String name) {
|
||||
if (name.isEmpty()) return null;
|
||||
return findRoot(name, getFileSystem());
|
||||
}
|
||||
};
|
||||
}
|
||||
else if (fs instanceof JarFileSystem) {
|
||||
// optimization: for jar roots do not store base path in the myName field, use local FS file's getPath()
|
||||
String parentPath = basePath.substring(0, basePath.indexOf(JarFileSystem.JAR_SEPARATOR));
|
||||
final VirtualFile parentLocalFile = LocalFileSystem.getInstance().findFileByPath(parentPath);
|
||||
if (parentLocalFile == null) return null;
|
||||
root = new JarRoot(fs, rootId, parentLocalFile);
|
||||
}
|
||||
else {
|
||||
root = new VirtualDirectoryImpl(basePath, null, fs, rootId);
|
||||
if (basePath.isEmpty()) {
|
||||
// fake super-root
|
||||
root = new VirtualDirectoryImpl("", null, fs, rootId) {
|
||||
@SuppressWarnings("NonSynchronizedMethodOverridesSynchronizedMethod")
|
||||
@Override
|
||||
@NotNull
|
||||
public VirtualFile[] getChildren() {
|
||||
return getRoots(getFileSystem());
|
||||
}
|
||||
|
||||
final FileAttributes attributes = fs.getAttributes(root);
|
||||
if (attributes == null) {
|
||||
return null;
|
||||
@Override
|
||||
public VirtualFileSystemEntry findChild(@NotNull String name) {
|
||||
if (name.isEmpty()) return null;
|
||||
return findRoot(name, getFileSystem());
|
||||
}
|
||||
};
|
||||
}
|
||||
else if (fs instanceof JarFileSystem) {
|
||||
// optimization: for jar roots do not store base path in the myName field, use local FS file's getPath()
|
||||
String parentPath = basePath.substring(0, basePath.indexOf(JarFileSystem.JAR_SEPARATOR));
|
||||
final VirtualFile parentLocalFile = LocalFileSystem.getInstance().findFileByPath(parentPath);
|
||||
if (parentLocalFile == null) return null;
|
||||
root = new JarRoot(fs, rootId, parentLocalFile);
|
||||
}
|
||||
else {
|
||||
root = new VirtualDirectoryImpl(basePath, null, fs, rootId);
|
||||
}
|
||||
|
||||
final boolean newRoot = copyRecordFromDelegateFS(rootId, 0, root, fs, attributes);
|
||||
if (!newRoot) {
|
||||
if (attributes.lastModified != FSRecords.getTimestamp(rootId)) {
|
||||
root.markDirtyRecursively();
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
final FileAttributes attributes = fs.getAttributes(root);
|
||||
if (attributes == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (basePath.isEmpty()) {
|
||||
myFakeRoot = root;
|
||||
}
|
||||
else {
|
||||
myRoots.put(rootUrl, root);
|
||||
myRootsById.put(root.getId(), root);
|
||||
final boolean newRoot = copyRecordFromDelegateFS(rootId, 0, root, fs, attributes);
|
||||
if (!newRoot) {
|
||||
if (attributes.lastModified != FSRecords.getTimestamp(rootId)) {
|
||||
root.markDirtyRecursively();
|
||||
}
|
||||
}
|
||||
|
||||
if (basePath.isEmpty()) {
|
||||
myFakeRoot = root;
|
||||
}
|
||||
else {
|
||||
myRoots.put(rootUrl, root);
|
||||
myRootsById.put(root.getId(), root);
|
||||
}
|
||||
|
||||
return root;
|
||||
}
|
||||
catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
finally {
|
||||
myRootsLock.writeLock().unlock();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -826,13 +839,18 @@ public class PersistentFSImpl extends PersistentFS implements ApplicationCompone
|
||||
@NotNull
|
||||
public VirtualFile[] getLocalRoots() {
|
||||
final List<VirtualFile> roots = new ArrayList<VirtualFile>();
|
||||
synchronized (LOCK) {
|
||||
|
||||
myRootsLock.readLock().lock();
|
||||
try {
|
||||
for (NewVirtualFile root : myRoots.values()) {
|
||||
if (root.isInLocalFileSystem()) {
|
||||
roots.add(root);
|
||||
}
|
||||
}
|
||||
}
|
||||
finally {
|
||||
myRootsLock.readLock().unlock();
|
||||
}
|
||||
|
||||
return VfsUtilCore.toVirtualFileArray(roots);
|
||||
}
|
||||
@@ -876,9 +894,13 @@ public class PersistentFSImpl extends PersistentFS implements ApplicationCompone
|
||||
private NewVirtualFile doFindFile(final int id, boolean cachedOnly) {
|
||||
final int parentId = getParent(id);
|
||||
if (parentId == 0) {
|
||||
synchronized (LOCK) {
|
||||
myRootsLock.readLock().lock();
|
||||
try {
|
||||
return myRootsById.get(id);
|
||||
}
|
||||
finally {
|
||||
myRootsLock.readLock().unlock();
|
||||
}
|
||||
}
|
||||
else {
|
||||
NewVirtualFile parentFile = _findFileById(parentId, cachedOnly);
|
||||
@@ -892,23 +914,32 @@ public class PersistentFSImpl extends PersistentFS implements ApplicationCompone
|
||||
@Override
|
||||
@NotNull
|
||||
public VirtualFile[] getRoots() {
|
||||
synchronized (LOCK) {
|
||||
myRootsLock.readLock().lock();
|
||||
try {
|
||||
Collection<VirtualFileSystemEntry> roots = myRoots.values();
|
||||
return VfsUtilCore.toVirtualFileArray(roots);
|
||||
}
|
||||
finally {
|
||||
myRootsLock.readLock().unlock();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public VirtualFile[] getRoots(@NotNull final NewVirtualFileSystem fs) {
|
||||
final List<VirtualFile> roots = new ArrayList<VirtualFile>();
|
||||
synchronized (LOCK) {
|
||||
|
||||
myRootsLock.readLock().lock();
|
||||
try {
|
||||
for (NewVirtualFile root : myRoots.values()) {
|
||||
if (root.getFileSystem() == fs) {
|
||||
roots.add(root);
|
||||
}
|
||||
}
|
||||
}
|
||||
finally {
|
||||
myRootsLock.readLock().unlock();
|
||||
}
|
||||
|
||||
return VfsUtilCore.toVirtualFileArray(roots);
|
||||
}
|
||||
@@ -1008,7 +1039,8 @@ public class PersistentFSImpl extends PersistentFS implements ApplicationCompone
|
||||
directory.removeChild(file);
|
||||
}
|
||||
else {
|
||||
synchronized (LOCK) {
|
||||
myRootsLock.writeLock().lock();
|
||||
try {
|
||||
myRoots.remove(file.getUrl());
|
||||
myRootsById.remove(id);
|
||||
try {
|
||||
@@ -1018,6 +1050,9 @@ public class PersistentFSImpl extends PersistentFS implements ApplicationCompone
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
finally {
|
||||
myRootsLock.writeLock().unlock();
|
||||
}
|
||||
}
|
||||
|
||||
invalidateSubtree(file);
|
||||
|
||||
@@ -16,8 +16,7 @@
|
||||
|
||||
package com.intellij.ui;
|
||||
|
||||
import com.intellij.openapi.util.Pair;
|
||||
import com.intellij.util.NullableFunction;
|
||||
import com.intellij.util.PairFunction;
|
||||
import com.intellij.util.containers.Convertor;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -25,27 +24,27 @@ import javax.swing.table.TableModel;
|
||||
import java.util.ListIterator;
|
||||
|
||||
public class TableSpeedSearch extends SpeedSearchBase<JTable> {
|
||||
private static final NullableFunction<Pair<Object, Cell>, String> TO_STRING = new NullableFunction<Pair<Object, Cell>, String>() {
|
||||
public String fun(Pair<Object, Cell> object) {
|
||||
return object.first == null ? "" : object.toString();
|
||||
private static final PairFunction<Object, Cell, String> TO_STRING = new PairFunction<Object, Cell, String>() {
|
||||
public String fun(Object o, Cell cell) {
|
||||
return o == null ? "" : o.toString();
|
||||
}
|
||||
};
|
||||
private final NullableFunction<Pair<Object, Cell>, String> myToStringConvertor;
|
||||
private final PairFunction<Object, Cell, String> myToStringConvertor;
|
||||
|
||||
public TableSpeedSearch(JTable table) {
|
||||
this(table, TO_STRING);
|
||||
}
|
||||
|
||||
public TableSpeedSearch(JTable table, final Convertor<Object, String> toStringConvertor) {
|
||||
this(table, new NullableFunction<Pair<Object, Cell>, String>() {
|
||||
this(table, new PairFunction<Object, Cell, String>() {
|
||||
@Override
|
||||
public String fun(Pair<Object, Cell> o) {
|
||||
return toStringConvertor.convert(o.first);
|
||||
public String fun(Object o, Cell c) {
|
||||
return toStringConvertor.convert(o);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public TableSpeedSearch(JTable table, final NullableFunction<Pair<Object, Cell>, String> toStringConvertor) {
|
||||
public TableSpeedSearch(JTable table, final PairFunction<Object, Cell, String> toStringConvertor) {
|
||||
super(table);
|
||||
myToStringConvertor = toStringConvertor;
|
||||
}
|
||||
@@ -78,7 +77,7 @@ public class TableSpeedSearch extends SpeedSearchBase<JTable> {
|
||||
final int row = myComponent.getSelectedRow();
|
||||
final int col = myComponent.getSelectedColumn();
|
||||
// selected row is not enough as we want to select specific cell in a large multi-column table
|
||||
return row > -1 && col > -1? row * myComponent.getModel().getColumnCount() + col : -1;
|
||||
return row > -1 && col > -1 ? row * myComponent.getModel().getColumnCount() + col : -1;
|
||||
}
|
||||
|
||||
protected Object[] getAllElements() {
|
||||
@@ -91,7 +90,7 @@ public class TableSpeedSearch extends SpeedSearchBase<JTable> {
|
||||
int row = index / model.getColumnCount();
|
||||
int col = index % model.getColumnCount();
|
||||
final Object value = model.getValueAt(row, col);
|
||||
return myToStringConvertor.fun(Pair.create(value, new Cell(row, col)));
|
||||
return myToStringConvertor.fun(value, new Cell(row, col));
|
||||
}
|
||||
|
||||
private class MyListIterator implements ListIterator<Object> {
|
||||
@@ -100,7 +99,7 @@ public class TableSpeedSearch extends SpeedSearchBase<JTable> {
|
||||
|
||||
public MyListIterator(int startingIndex) {
|
||||
final int total = getElementCount();
|
||||
myCursor = startingIndex < 0? total : startingIndex;
|
||||
myCursor = startingIndex < 0 ? total : startingIndex;
|
||||
}
|
||||
|
||||
public boolean hasNext() {
|
||||
|
||||
@@ -56,6 +56,8 @@
|
||||
serviceImplementation="com.intellij.codeInspection.ex.InspectionToolRegistrar"/>
|
||||
<applicationService serviceInterface="com.intellij.codeInsight.template.impl.TemplateSettings"
|
||||
serviceImplementation="com.intellij.codeInsight.template.impl.TemplateSettings"/>
|
||||
<applicationService serviceInterface="com.intellij.codeInsight.template.impl.ExportableTemplateSettings"
|
||||
serviceImplementation="com.intellij.codeInsight.template.impl.ExportableTemplateSettings"/>
|
||||
<applicationService serviceInterface="com.intellij.execution.ui.layout.impl.RunnerLayoutSettings"
|
||||
serviceImplementation="com.intellij.execution.ui.layout.impl.RunnerLayoutSettings"/>
|
||||
<exportable serviceInterface="com.intellij.codeInsight.template.impl.TemplateSettings"/>
|
||||
|
||||
@@ -175,6 +175,19 @@ public class PathManagerEx {
|
||||
return isLocatedInCommunity() ? path : path + File.separator + "community";
|
||||
}
|
||||
|
||||
/**
|
||||
* Find file by its path relative to 'community' directory irrespective of current project
|
||||
* @param relativePath path to file relative to 'community' directory
|
||||
* @return file under the home directory of 'community' project
|
||||
*/
|
||||
public static File findFileUnderCommunityHome(String relativePath) {
|
||||
File file = new File(getCommunityHomePath(), toSystemDependentName(relativePath));
|
||||
if (!file.exists()) {
|
||||
throw new IllegalArgumentException("Cannot find file '" + relativePath + "' under '" + getCommunityHomePath() + "' directory");
|
||||
}
|
||||
return file;
|
||||
}
|
||||
|
||||
private static boolean isLocatedInCommunity() {
|
||||
FileSystemLocation projectLocation = parseProjectLocation();
|
||||
return projectLocation == FileSystemLocation.COMMUNITY;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2012 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.
|
||||
@@ -13,10 +13,13 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jetbrains.idea.svn.config;
|
||||
package com.intellij.ui;
|
||||
|
||||
import java.util.List;
|
||||
import java.awt.*;
|
||||
|
||||
public interface RepositoryUrlsListener {
|
||||
void onListChanged(final List<String> urls);
|
||||
/**
|
||||
* @author Konstantin Bulenkov
|
||||
*/
|
||||
public interface DarculaColors {
|
||||
Color BLUE = new Color(150, 150, 255);
|
||||
}
|
||||
@@ -20,8 +20,8 @@ import org.jetbrains.annotations.Nullable;
|
||||
/**
|
||||
* @author max
|
||||
*/
|
||||
public interface PairFunction<T, V, U> {
|
||||
public interface PairFunction<Arg1, Arg2, ResultType> {
|
||||
@Nullable
|
||||
U fun(T t, V v);
|
||||
ResultType fun(Arg1 t, Arg2 v);
|
||||
|
||||
}
|
||||
|
||||
@@ -397,6 +397,7 @@ public class LineStatusTracker {
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
FileDocumentManager.getInstance().saveDocument(e.getDocument());
|
||||
boolean[] stillEmpty = new boolean[1];
|
||||
synchronized (myLock) {
|
||||
stillEmpty[0] = myRanges.isEmpty();
|
||||
|
||||
@@ -157,20 +157,22 @@ public class ResourceDialog extends DialogWrapper implements TreeSelectionListen
|
||||
}
|
||||
}
|
||||
if (doSelection && value.startsWith("@")) {
|
||||
ResourcePanel panel;
|
||||
String type;
|
||||
int index = value.indexOf('/');
|
||||
String name = value.substring(index + 1);
|
||||
if (value.startsWith(ANDROID)) {
|
||||
panel = mySystemPanel;
|
||||
type = value.substring(ANDROID.length(), index);
|
||||
if (index != -1) {
|
||||
ResourcePanel panel;
|
||||
String type;
|
||||
String name = value.substring(index + 1);
|
||||
if (value.startsWith(ANDROID)) {
|
||||
panel = mySystemPanel;
|
||||
type = value.substring(ANDROID.length(), index);
|
||||
}
|
||||
else {
|
||||
panel = myProjectPanel;
|
||||
type = value.substring(1, index);
|
||||
}
|
||||
myContentPanel.setSelectedComponent(panel.myComponent);
|
||||
panel.select(type, name);
|
||||
}
|
||||
else {
|
||||
panel = myProjectPanel;
|
||||
type = value.substring(1, index);
|
||||
}
|
||||
myContentPanel.setSelectedComponent(panel.myComponent);
|
||||
panel.select(type, name);
|
||||
}
|
||||
|
||||
myContentPanel.addChangeListener(new ChangeListener() {
|
||||
|
||||
@@ -12,6 +12,7 @@ import com.intellij.openapi.util.Computable;
|
||||
import com.intellij.psi.PsiDirectory;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.util.PlatformIcons;
|
||||
import org.jetbrains.android.facet.AndroidFacet;
|
||||
import org.jetbrains.android.util.AndroidBundle;
|
||||
import org.jetbrains.android.util.AndroidResourceUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -85,7 +86,7 @@ public class CreateResourceDirectoryAction extends CreateElementActionBase {
|
||||
protected boolean isAvailable(DataContext context) {
|
||||
if (!super.isAvailable(context)) return false;
|
||||
final PsiElement element = (PsiElement)context.getData(LangDataKeys.PSI_ELEMENT.getName());
|
||||
if (!(element instanceof PsiDirectory)) {
|
||||
if (!(element instanceof PsiDirectory) || AndroidFacet.getInstance(element) == null) {
|
||||
return false;
|
||||
}
|
||||
return ApplicationManager.getApplication().runReadAction(new Computable<Boolean>() {
|
||||
|
||||
@@ -81,7 +81,7 @@ public class CreateResourceFileAction extends CreateElementActionBase {
|
||||
protected boolean isAvailable(DataContext context) {
|
||||
if (!super.isAvailable(context)) return false;
|
||||
final PsiElement element = (PsiElement)context.getData(DataKeys.PSI_ELEMENT.getName());
|
||||
if (!(element instanceof PsiDirectory)) {
|
||||
if (!(element instanceof PsiDirectory) || AndroidFacet.getInstance(element) == null) {
|
||||
return false;
|
||||
}
|
||||
return ApplicationManager.getApplication().runReadAction(new Computable<Boolean>() {
|
||||
|
||||
@@ -146,6 +146,10 @@ public class CreateTypedResourceFileAction extends CreateElementActionBase {
|
||||
|
||||
static boolean doIsAvailable(DataContext context, final String resourceType) {
|
||||
final PsiElement element = (PsiElement)context.getData(LangDataKeys.PSI_ELEMENT.getName());
|
||||
if (element == null || AndroidFacet.getInstance(element) == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return ApplicationManager.getApplication().runReadAction(new Computable<Boolean>() {
|
||||
public Boolean compute() {
|
||||
PsiElement e = element;
|
||||
|
||||
@@ -159,6 +159,16 @@ public class AndroidModuleBuilder extends JavaModuleBuilder {
|
||||
}
|
||||
|
||||
private void createProject(VirtualFile contentRoot, VirtualFile sourceRoot, AndroidFacet facet) {
|
||||
if (sourceRoot == null) {
|
||||
try {
|
||||
// user've chosen "do not create source root"
|
||||
sourceRoot = contentRoot.createChildDirectory(this, "src");
|
||||
}
|
||||
catch (IOException e) {
|
||||
LOG.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
if (myProjectType == ProjectType.APPLICATION) {
|
||||
createDirectoryStructure(contentRoot, sourceRoot, facet);
|
||||
}
|
||||
|
||||
@@ -32,6 +32,7 @@ import com.intellij.ui.components.JBLabel;
|
||||
import org.jetbrains.android.facet.AndroidFacet;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
@@ -179,11 +180,28 @@ public class AndroidRunConfigurationEditor<T extends AndroidRunConfigurationBase
|
||||
myConfigurationSpecificEditor.resetFrom(configuration);
|
||||
myWipeUserDataCheckBox.setSelected(configuration.WIPE_USER_DATA);
|
||||
myDisableBootAnimationCombo.setSelected(configuration.DISABLE_BOOT_ANIMATION);
|
||||
myNetworkSpeedCombo.setSelectedItem(configuration.NETWORK_SPEED);
|
||||
myNetworkLatencyCombo.setSelectedItem(configuration.NETWORK_SPEED);
|
||||
selectItemCaseInsensitively(myNetworkSpeedCombo, configuration.NETWORK_SPEED);
|
||||
selectItemCaseInsensitively(myNetworkLatencyCombo, configuration.NETWORK_LATENCY);
|
||||
myClearLogCheckBox.setSelected(configuration.CLEAR_LOGCAT);
|
||||
}
|
||||
|
||||
private static void selectItemCaseInsensitively(@NotNull JComboBox comboBox, @Nullable String item) {
|
||||
if (item == null) {
|
||||
comboBox.setSelectedItem(null);
|
||||
return;
|
||||
}
|
||||
|
||||
final ComboBoxModel model = comboBox.getModel();
|
||||
|
||||
for (int i = 0, n = model.getSize(); i < n; i++) {
|
||||
final Object element = model.getElementAt(i);
|
||||
if (element instanceof String && item.equalsIgnoreCase((String)element)) {
|
||||
comboBox.setSelectedItem(element);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void applyEditorTo(T configuration) throws ConfigurationException {
|
||||
myModuleSelector.applyTo(configuration);
|
||||
|
||||
|
||||
@@ -127,11 +127,11 @@ class ProjectCallback extends LegacyCallback implements IProjectCallback {
|
||||
}
|
||||
}
|
||||
catch (ClassNotFoundException e) {
|
||||
LOG.info(e);
|
||||
LOG.debug(e);
|
||||
myBrokenClasses.put(className, e.getCause());
|
||||
}
|
||||
catch (InvocationTargetException e) {
|
||||
LOG.info(e);
|
||||
LOG.debug(e);
|
||||
|
||||
final Throwable cause = e.getCause();
|
||||
if (cause instanceof IncompatibleClassFileFormatException) {
|
||||
@@ -142,15 +142,15 @@ class ProjectCallback extends LegacyCallback implements IProjectCallback {
|
||||
}
|
||||
}
|
||||
catch (IllegalAccessException e) {
|
||||
LOG.info(e);
|
||||
LOG.debug(e);
|
||||
myBrokenClasses.put(className, e.getCause());
|
||||
}
|
||||
catch (InstantiationException e) {
|
||||
LOG.info(e);
|
||||
LOG.debug(e);
|
||||
myBrokenClasses.put(className, e.getCause());
|
||||
}
|
||||
catch (NoSuchMethodException e) {
|
||||
LOG.info(e);
|
||||
LOG.debug(e);
|
||||
myBrokenClasses.put(className, e.getCause());
|
||||
}
|
||||
catch (IncompatibleClassFileFormatException e) {
|
||||
@@ -194,7 +194,7 @@ class ProjectCallback extends LegacyCallback implements IProjectCallback {
|
||||
return myProjectClassLoader.loadClass(className);
|
||||
}
|
||||
catch (ClassNotFoundException e) {
|
||||
LOG.info(e);
|
||||
LOG.debug(e);
|
||||
if (!className.equals(FRAGMENT_TAG_NAME)) {
|
||||
myMissingClasses.add(className);
|
||||
}
|
||||
@@ -369,7 +369,7 @@ class ProjectCallback extends LegacyCallback implements IProjectCallback {
|
||||
constructor = clazz.getConstructor(constructorSignature);
|
||||
if (constructor != null) {
|
||||
if (constructorSignature.length < 2) {
|
||||
LOG.warn("wrong_constructor: Custom view " +
|
||||
LOG.info("wrong_constructor: Custom view " +
|
||||
clazz.getSimpleName() +
|
||||
" is not using the 2- or 3-argument " +
|
||||
"View constructors; XML attributes will not work");
|
||||
|
||||
@@ -26,7 +26,7 @@ import org.jetbrains.jps.model.serialization.JpsSerializationTestCase;
|
||||
public class JpsPluginProjectSerializationTest extends JpsSerializationTestCase {
|
||||
public void testLoadProject() {
|
||||
loadProject("plugins/devkit/jps-plugin/testData/pluginProject/pluginProject.ipr");
|
||||
JpsModule module = assertOneElement(myModel.getProject().getModules());
|
||||
JpsModule module = assertOneElement(myProject.getModules());
|
||||
assertEquals(JpsPluginModuleType.INSTANCE, module.getModuleType());
|
||||
JpsTypedModule<JpsSimpleElement<JpsPluginModuleProperties>> pluginModule = module.asTyped(JpsPluginModuleType.INSTANCE);
|
||||
assertNotNull(pluginModule);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2011 JetBrains s.r.o.
|
||||
* Copyright 2000-2012 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.
|
||||
@@ -17,6 +17,8 @@ package git4idea.test;
|
||||
|
||||
import com.intellij.execution.process.CapturingProcessHandler;
|
||||
import com.intellij.execution.process.ProcessOutput;
|
||||
import com.intellij.execution.util.ExecUtil;
|
||||
import com.intellij.openapi.util.SystemInfo;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.openapi.vfs.CharsetToolkit;
|
||||
import com.intellij.util.ArrayUtil;
|
||||
@@ -110,6 +112,13 @@ public class GitTestRunEnv {
|
||||
log("Using Git from TEAMCITY_GIT_PATH: " + exec);
|
||||
return exec;
|
||||
}
|
||||
if (SystemInfo.isUnix) {
|
||||
exec = ExecUtil.execAndReadLine("which", "git");
|
||||
if (exec != null && new File(exec).exists()) {
|
||||
log("Using Git from PATH: " + exec);
|
||||
return exec;
|
||||
}
|
||||
}
|
||||
throw new IllegalStateException("Git executable not found. " +
|
||||
"Please define IDEA_TEST_GIT_EXECUTABLE environment variable pointing to the Git executable.");
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ package org.jetbrains.idea.svn;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.progress.ProcessCanceledException;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.Computable;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.openapi.vcs.FilePath;
|
||||
import com.intellij.openapi.vcs.FilePathImpl;
|
||||
@@ -215,19 +216,18 @@ public class SvnRecursiveStatusWalker {
|
||||
final File ioFile = status.getFile();
|
||||
checkIfCopyRootWasReported();
|
||||
|
||||
final boolean[] excluded = new boolean[1];
|
||||
final VirtualFile[] vfRef = new VirtualFile[1];
|
||||
ApplicationManager.getApplication().runReadAction(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (myProject.isDisposed()) return;
|
||||
vfRef[0] = getVirtualFile(ioFile);
|
||||
excluded[0] = vfRef[0] != null && myPartner.isExcluded(vfRef[0]);
|
||||
}
|
||||
});
|
||||
final VirtualFile vFile = getVirtualFile(ioFile);
|
||||
if (vFile != null) {
|
||||
final Boolean excluded = ApplicationManager.getApplication().runReadAction(new Computable<Boolean>() {
|
||||
@Override
|
||||
public Boolean compute() {
|
||||
if (myProject.isDisposed()) return null;
|
||||
return myPartner.isExcluded(vFile);
|
||||
}
|
||||
});
|
||||
if (Boolean.TRUE.equals(excluded)) return;
|
||||
}
|
||||
if (myProject.isDisposed()) throw new ProcessCanceledException();
|
||||
final VirtualFile vFile = vfRef[0];
|
||||
if (excluded[0]) return;
|
||||
|
||||
if ((vFile != null) && (SvnVcs.svnStatusIsUnversioned(status))) {
|
||||
if (vFile.isDirectory()) {
|
||||
|
||||
@@ -19,6 +19,7 @@ import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.progress.ProgressIndicator;
|
||||
import com.intellij.openapi.progress.ProgressManager;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.lang.reflect.Field;
|
||||
@@ -35,12 +36,17 @@ import java.lang.reflect.Method;
|
||||
*/
|
||||
public class SVNStoppableInputStream extends InputStream {
|
||||
private final static Logger LOG = Logger.getInstance("#org.jetbrains.idea.svn.lowLevel.SVNStoppableInputStream");
|
||||
private final static String ourCheckAvalilable = "svn.check.available";
|
||||
private final InputStream myOriginalIs;
|
||||
private final InputStream myIn;
|
||||
private boolean myAvailableChecked;
|
||||
private final boolean myCheckAvailable;
|
||||
|
||||
public SVNStoppableInputStream(InputStream original, InputStream in) {
|
||||
myOriginalIs = digOriginal(original);
|
||||
final String property = System.getProperty(ourCheckAvalilable);
|
||||
//myCheckAvailable = StringUtil.isEmptyOrSpaces(property) || Boolean.parseBoolean(property);
|
||||
myCheckAvailable = Boolean.parseBoolean(property);
|
||||
myOriginalIs = myCheckAvailable ? digOriginal(original) : original;
|
||||
myIn = in;
|
||||
myAvailableChecked = false;
|
||||
}
|
||||
@@ -58,6 +64,8 @@ public class SVNStoppableInputStream extends InputStream {
|
||||
current = byName(current, "myInputStream");
|
||||
} else if ("org.tmatesoft.svn.core.internal.util.FixedSizeInputStream".equals(name)) {
|
||||
current = byName(current, "mySource");
|
||||
} else if (current instanceof BufferedInputStream) {
|
||||
return createReadingProxy(current);
|
||||
} else {
|
||||
// maybe ok class, maybe some unknown proxy
|
||||
Method[] methods = current.getClass().getDeclaredMethods();
|
||||
@@ -192,6 +200,7 @@ public class SVNStoppableInputStream extends InputStream {
|
||||
}
|
||||
|
||||
private void waitForAvailable() throws IOException {
|
||||
if (! myCheckAvailable) return;
|
||||
final Object lock = new Object();
|
||||
synchronized (lock) {
|
||||
while (available() <= 0) {
|
||||
|
||||
@@ -175,7 +175,9 @@ public class SvnIdeaRepositoryPoolManager implements ISVNRepositoryPool, ISVNSes
|
||||
ourGuard.removeRepositoryPool((CachingSvnRepositoryPool)myPool);
|
||||
}
|
||||
myKeepConnection = false;
|
||||
myListener.dispose();
|
||||
if (myListener != null) {
|
||||
myListener.dispose();
|
||||
}
|
||||
myAuthManager.dispose();
|
||||
myTunnelProvider.dispose();
|
||||
myPool.dispose();
|
||||
|
||||
@@ -1,93 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<project name="deploy" default="jar_plugin" basedir="..">
|
||||
<property name="plugname" value="Svn4Idea"/>
|
||||
<property name="build.path" value="build_out"/>
|
||||
|
||||
|
||||
<target name="deploy-javasvn">
|
||||
<ant dir="../org.tmatesoft.javasvn" antfile="../org.tmatesoft.javasvn/build.xml" target="clean"/>
|
||||
<ant dir="../org.tmatesoft.javasvn" antfile="../org.tmatesoft.javasvn/build.xml" target="build-library"/>
|
||||
<copy file="../org.tmatesoft.javasvn/build/lib/javasvn.jar" tofile="lib/javasvn.jar" overwrite="true"/>
|
||||
</target>
|
||||
|
||||
<target name="jar_plugin">
|
||||
|
||||
<delete includeEmptyDirs="true" failonerror="false">
|
||||
<fileset dir="${build.path}/com"/>
|
||||
<fileset dir="${build.path}/META-INF"/>
|
||||
</delete>
|
||||
|
||||
<mkdir dir="${build.path}"/>
|
||||
|
||||
<copy todir="${build.path}/META-INF">
|
||||
<fileset dir="src/META-INF"/>
|
||||
</copy>
|
||||
|
||||
<copy todir="${build.path}/com">
|
||||
<fileset dir="classes/com"/>
|
||||
</copy>
|
||||
|
||||
<jar jarfile="${build.path}/${plugname}.jar" basedir="${build.path}"
|
||||
excludes="${plugname}.jar"/>
|
||||
|
||||
<mkdir dir="${idea.path}/plugins/svn4idea"/>
|
||||
<mkdir dir="${idea.path}/plugins/svn4idea/lib"/>
|
||||
<copy todir="${idea.path}/plugins/svn4idea/lib">
|
||||
<fileset file="${build.path}/${plugname}.jar"/>
|
||||
<fileset file="${svnjavahl.path}"/>
|
||||
</copy>
|
||||
</target>
|
||||
<target name="package">
|
||||
<tstamp/>
|
||||
<property file="version.properties"/>
|
||||
<condition property="version" value="unknown">
|
||||
<not>
|
||||
<isset property="version"/>
|
||||
</not>
|
||||
</condition>
|
||||
<property name="targetdir" value="svn4idea-${version}"/>
|
||||
<delete failonerror="false" includeemptydirs="true">
|
||||
<fileset dir="${targetdir}"/>
|
||||
</delete>
|
||||
<mkdir dir="${targetdir}"/>
|
||||
<mkdir dir="${targetdir}/src"/>
|
||||
<copy todir="${targetdir}/src">
|
||||
<fileset dir="src">
|
||||
<exclude name="**/.svn*"/>
|
||||
<exclude name="com/qintsoft/svn4idea/test/**"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
<copy todir="${targetdir}">
|
||||
<fileset file="README.txt"/>
|
||||
</copy>
|
||||
<mkdir dir="${targetdir}/build"/>
|
||||
<copy todir="${targetdir}/build">
|
||||
<fileset file="build/build.xml"/>
|
||||
</copy>
|
||||
<mkdir dir="${targetdir}/cls"/>
|
||||
<replace file="${targetdir}/src/com/qintsoft/svn4idea/Version.java" token="@devbuild@" value="${version}"/>
|
||||
<replace file="${targetdir}/src/com/qintsoft/svn4idea/Version.java" token="@tstamp@" value="${TSTAMP}"/>
|
||||
<replace file="${targetdir}/src/com/qintsoft/svn4idea/Version.java" token="@date@" value="${DSTAMP}"/>
|
||||
<javac compiler="modern" destdir="${targetdir}/cls">
|
||||
<src path="${targetdir}/src"/>
|
||||
<classpath path="${svnjavahl.path}"/>
|
||||
<classpath path="${svnup.path}"/>
|
||||
<classpath path="${idea.path}/lib/dev/openapi.jar"/>
|
||||
<classpath path="${idea.path}/lib/jdom.jar"/>
|
||||
<exclude name="META-INF/plugin.xml"/>
|
||||
</javac>
|
||||
<mkdir dir="${targetdir}/cls/META-INF"/>
|
||||
<copy todir="${targetdir}/cls/META-INF">
|
||||
<fileset file="${targetdir}/src/META-INF/plugin.xml"/>
|
||||
</copy>
|
||||
<jar jarfile="svn4idea-${version}.jar" basedir="${targetdir}/cls">
|
||||
</jar>
|
||||
<delete includeemptydirs="true" failonerror="false">
|
||||
<fileset dir="${targetdir}/cls"/>
|
||||
</delete>
|
||||
<zip zipfile="svn4idea-${version}.zip" basedir="." includes="${targetdir}/**"/>
|
||||
<delete includeemptydirs="true" failonerror="false">
|
||||
<fileset dir="${targetdir}"/>
|
||||
</delete>
|
||||
</target>
|
||||
</project>
|
||||
@@ -1,26 +0,0 @@
|
||||
[The "BSD licence"]
|
||||
Copyright (c) 2003-2008 Terence Parr
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. The name of the author may not be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -1,47 +0,0 @@
|
||||
The TMate License
|
||||
|
||||
This license applies to all portions of TMate SVNKit library, which
|
||||
are not externally-maintained libraries (e.g. Trilead SSH library).
|
||||
|
||||
All the source code and compiled classes in package org.tigris.subversion.javahl
|
||||
except SvnClient class are covered by the license in JAVAHL-LICENSE file
|
||||
|
||||
Copyright (c) 2004-2011 TMate Software. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
* Redistributions in any form must be accompanied by information on how to
|
||||
obtain complete source code for the software that uses SVNKit and any
|
||||
accompanying software that uses the software that uses SVNKit. The source
|
||||
code must either be included in the distribution or be available for no
|
||||
more than the cost of distribution plus a nominal fee, and must be freely
|
||||
redistributable under reasonable conditions. For an executable file, complete
|
||||
source code means the source code for all modules it contains. It does not
|
||||
include source code for modules or files that typically accompany the major
|
||||
components of the operating system on which the executable file runs.
|
||||
|
||||
* Redistribution in any form without redistributing source code for software
|
||||
that uses SVNKit is possible only when such redistribution is explictly permitted
|
||||
by TMate Software. Please, contact TMate Software at support@svnkit.com to
|
||||
get such permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY TMATE SOFTWARE ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE
|
||||
DISCLAIMED.
|
||||
|
||||
IN NO EVENT SHALL TMATE SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
@@ -1,57 +0,0 @@
|
||||
Copyright (c) 2005 - 2006 Swiss Federal Institute of Technology (ETH Zurich),
|
||||
Department of Computer Science (http://www.inf.ethz.ch),
|
||||
Christian Plattner. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
a.) Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
b.) Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
c.) Neither the name of ETH Zurich nor the names of its contributors may
|
||||
be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
The Java implementations of the AES, Blowfish and 3DES ciphers have been
|
||||
taken (and slightly modified) from the cryptography package released by
|
||||
"The Legion Of The Bouncy Castle".
|
||||
|
||||
Their license states the following:
|
||||
|
||||
Copyright (c) 2000 - 2004 The Legion Of The Bouncy Castle
|
||||
(http://www.bouncycastle.org)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
This license applies to all portions of Subversion which are not
|
||||
externally-maintained libraries (e.g. apr/, apr-util/, and neon/).
|
||||
Such libraries have their own licenses; we recommend you read them, as
|
||||
their terms may differ from the terms below.
|
||||
|
||||
This is version 1 of this license. It is also available online at
|
||||
http://subversion.tigris.org/license-1.html. If newer versions of
|
||||
this license are posted there (the same URL, but with the version
|
||||
number incremented: .../license-2.html, .../license-3.html, and so
|
||||
on), you may use a newer version instead, at your option.
|
||||
|
||||
====================================================================
|
||||
Copyright (c) 2000-2005 CollabNet. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. The end-user documentation included with the redistribution, if
|
||||
any, must include the following acknowledgment: "This product includes
|
||||
software developed by CollabNet (http://www.Collab.Net/)."
|
||||
Alternately, this acknowledgment may appear in the software itself, if
|
||||
and wherever such third-party acknowledgments normally appear.
|
||||
|
||||
4. The hosted project names must not be used to endorse or promote
|
||||
products derived from this software without prior written
|
||||
permission. For written permission, please contact info@collab.net.
|
||||
|
||||
5. Products derived from this software may not use the "Tigris" name
|
||||
nor may "Tigris" appear in their names without prior written
|
||||
permission of CollabNet.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
|
||||
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL COLLABNET OR ITS CONTRIBUTORS BE LIABLE FOR ANY
|
||||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
||||
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
====================================================================
|
||||
|
||||
This software consists of voluntary contributions made by many
|
||||
individuals on behalf of CollabNet.
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
Copyright (c) 2008 Timothy Wall, All Rights Reserved
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
@@ -1,45 +0,0 @@
|
||||
This is a README.txt file for SVNKit - pure Java Subversion client library.
|
||||
|
||||
1. DESCRIPTION
|
||||
|
||||
SVNKit is a pure Java Subversion client library.
|
||||
|
||||
2. LICENSING
|
||||
|
||||
SVNKit is open source product. The complete source code, documentation, and files required
|
||||
to build the library are available for download from our Web site at http://svnkit.com/
|
||||
|
||||
The TMate open source license permits you to use SVNKit at no charge under the condition
|
||||
that if you use the software in an application you redistribute, the complete source code for
|
||||
your application must be available and freely redistributable under reasonable conditions.
|
||||
|
||||
If you do not want to release the source code for your application, you may purchase a license
|
||||
from TMate Software. For pricing information, or if you have further questions on licensing,
|
||||
please contact us at support@svnkit.com.
|
||||
|
||||
You may find the TMate open source license in COPYING file that is located within the same
|
||||
directory as this file or at http://svnkit.com/license.html
|
||||
|
||||
3. FEATURES
|
||||
|
||||
SVNKit allows to work with Subversion repositories and Subversion working copies. SVNKit features
|
||||
direct repository access as well as support for all high level Subversion operation that are
|
||||
available with the command line Subversion client.
|
||||
|
||||
This version of SVNKit supports all Subversion 1.6.15 features and supports older Subversion repositories.
|
||||
|
||||
4. RESOURCES
|
||||
|
||||
SVNKit Web Site: http://svnkit.com/
|
||||
SVNKit Documentation: http://svnkit.com/documentation.html
|
||||
SVNKit Wiki: https://wiki.svnkit.com/
|
||||
SVNKit JavaDoc: http://svnkit.com/javadoc/
|
||||
|
||||
SVNKit Mailing List: http://svnkit.com/support.html
|
||||
SVNKit Issues Tracker: http://svnkit.com/tracker/
|
||||
|
||||
SVNKit Continuous Build Server: https://teamcity.svnkit.com/
|
||||
|
||||
5. CONTACTS
|
||||
|
||||
On all questions related to SVNKit please contact us at support@svnkit.com
|
||||
@@ -1,48 +0,0 @@
|
||||
Sequence Library License
|
||||
|
||||
This license applies to all portions of the Sequence library, which
|
||||
are not externally-maintained libraries (e.g. junit or jsch).
|
||||
====================================================================
|
||||
Copyright (c) 2000-2008 SyntEvo GmbH, Ainring, GERMANY.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. The end-user documentation included with the redistribution, if
|
||||
any, must include the following acknowledgment: "This product includes
|
||||
software developed by SyntEvo GmbH, Ainring, GERMANY."
|
||||
Alternately, this acknowledgment may appear in the software itself, if
|
||||
and wherever such third-party acknowledgments normally appear.
|
||||
|
||||
4. The hosted project names must not be used to endorse or promote
|
||||
products derived from this software without prior written
|
||||
permission. For written permission, please contact
|
||||
info@syntevo.com.
|
||||
|
||||
5. Neither the name of SyntEvo GmbH nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this
|
||||
software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
|
||||
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL SyntEvo GmbH OR HIS CONTRIBUTORS BE LIABLE FOR ANY
|
||||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
||||
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
====================================================================
|
||||
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
Copyright (C) 2009-2011 TMate Software Ltd
|
||||
|
||||
As part of SVNKit library, SQLJet library is distributed under
|
||||
the terms of TMate Open Source License (see http://svnkit.com/license.html).
|
||||
Otherwise, outside of SVNKit library, the following licensing terms
|
||||
are applicable for SQLJet library:
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
For information on how to redistribute this software under
|
||||
the terms of a license other than GNU General Public License
|
||||
contact TMate Software at support@sqljet.com
|
||||
@@ -1,42 +0,0 @@
|
||||
This is a README.txt file for SQLJet v1.0.4.
|
||||
SQLJet is a pure Java (tm) embedded database management engine with SQLite format support.
|
||||
|
||||
1. DESCRIPTION
|
||||
|
||||
SQLJet is a pure Java embedded database management engine with SQLite format support.
|
||||
|
||||
2. LICENSING
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
For information on how to redistribute this software under
|
||||
the terms of a license other than GNU General Public License
|
||||
contact TMate Software at support@sqljet.com
|
||||
|
||||
3. FEATURES
|
||||
|
||||
* Current version of SQLJet provides API to manipulate B-Tree data structures
|
||||
(tables and indices) stored in the database and database schema.
|
||||
|
||||
* SQLJet database format is compatible with SQLite 3.6,
|
||||
i.e. databases created with SQLJet could be used by SQLite 3.6 (assuming schema is valid)
|
||||
and vice versa, databases created by SQLite 3.6 are understood and could be read and modified
|
||||
by SQLJet.
|
||||
|
||||
* SQLJet is pure Java and could be ran on any platform under JVM 1.5 or newer.
|
||||
|
||||
* SQLJet implements ACID transactions.
|
||||
|
||||
4. RESOURCES
|
||||
|
||||
SQLJet web site: http://sqljet.com/
|
||||
SQLJet source code: http://svn.sqljet.com/repos/sqljet/
|
||||
SQLJet API usage tutorial: http://sqljet.com/tutorial.html
|
||||
|
||||
SQLite web site: http://sqlite.org/
|
||||
|
||||
5. CONTACTS
|
||||
|
||||
On all questions related to SQLJet please contact us at support@sqljet.com
|
||||
@@ -1,88 +0,0 @@
|
||||
Copyright (c) 2007-2008 Trilead AG (http://www.trilead.com)
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
a.) Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
b.) Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
c.) Neither the name of Trilead nor the names of its contributors may
|
||||
be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Trilead SSH-2 for Java includes code that was written by Dr. Christian Plattner
|
||||
during his PhD at ETH Zurich. The license states the following:
|
||||
|
||||
Copyright (c) 2005 - 2006 Swiss Federal Institute of Technology (ETH Zurich),
|
||||
Department of Computer Science (http://www.inf.ethz.ch),
|
||||
Christian Plattner. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
a.) Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
b.) Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
c.) Neither the name of ETH Zurich nor the names of its contributors may
|
||||
be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
The Java implementations of the AES, Blowfish and 3DES ciphers have been
|
||||
taken (and slightly modified) from the cryptography package released by
|
||||
"The Legion Of The Bouncy Castle".
|
||||
|
||||
Their license states the following:
|
||||
|
||||
Copyright (c) 2000 - 2004 The Legion Of The Bouncy Castle
|
||||
(http://www.bouncycastle.org)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
@@ -1,534 +0,0 @@
|
||||
== version 1.3.5 ==
|
||||
|
||||
+ Changes made in Subversion since version 1.6.12 implemented,
|
||||
all Subversion 1.6.15 features are supported.
|
||||
|
||||
+ Support for OS X Keychain as credentials storage added.
|
||||
+ SSL client certificate passphrase is cached in a way
|
||||
compatible with that of the native Subversion.
|
||||
+ HTTP cookies are handled properly.
|
||||
+ SQLJet library upgraded to v1.0.4
|
||||
|
||||
+ Other minor bugfixes and improvements.
|
||||
|
||||
== version 1.3.4 ==
|
||||
|
||||
+ Changes made in Subversion since version 1.6.11 implemented,
|
||||
all Subversion 1.6.12 features are supported.
|
||||
|
||||
+ Added support for SSH host fingerprints verification.
|
||||
+ Name conflict status added which is reported on
|
||||
case-insensitive filesystems for files which name differs only in case.
|
||||
+ HTTP digest authentication support improved.
|
||||
+ svnkit:charset property support significantly improved.
|
||||
+ SQLJet library upgraded to v1.0.3
|
||||
+ JNA library upgraded to v3.2.7
|
||||
|
||||
+ Other minor bugfixes and improvements.
|
||||
|
||||
== version 1.3.3 ==
|
||||
|
||||
+ Changes made in Subversion since version 1.6.6 implemented,
|
||||
all Subversion 1.6.11 features are supported.
|
||||
|
||||
+ HTTP Negotiate authentication improvements.
|
||||
+ Support of MSCAPI SSL certificates added.
|
||||
+ SQLJet library upgraded to version 1.0.2
|
||||
+ File externals support improved
|
||||
|
||||
+ Other bugfixes
|
||||
|
||||
== version 1.3.2 ==
|
||||
|
||||
+ Changes made in Subversion since version 1.6.5 implemented,
|
||||
all Subversion 1.6.6 features are supported.
|
||||
|
||||
* Negotiate authorization mechanism was not used when multiple authorization
|
||||
schemes were offered to client by server.
|
||||
* SQLJet library upgraded to version 1.0.1.
|
||||
* JNA library upgraded to version 3.2.3.
|
||||
|
||||
+ Bugfixes and performance improvements.
|
||||
|
||||
== version 1.3.1 ==
|
||||
|
||||
+ Changes made in Subversion since version 1.6.2 implemented,
|
||||
all Subversion 1.6.5 features are supported.
|
||||
|
||||
* Representation cache DB support, using SQLJet (http://sqljet.com) library.
|
||||
* Added implementations for couple of missing JavaHL methods.
|
||||
* Fixed 'svn: Checksum mismatch while reading representation' exception on
|
||||
reading vdelta from local repositories.
|
||||
* Several dump and load operation issues fixed.
|
||||
* JNA library upgraded to version 3.1.0.
|
||||
|
||||
+ Other bugfixes and performance improvements.
|
||||
|
||||
== version 1.3.0
|
||||
|
||||
+ Changes made in Subversion since version 1.5.6 implemented,
|
||||
all Subversion 1.6.2 features are supported:
|
||||
* Tree conflicts handled more gracefully
|
||||
* File-externals support for intra-repository files
|
||||
* File protocol: 1.6.2 Subversion repositories format supported
|
||||
* Administrative tools: support for packing repository shards
|
||||
* Command line client: repository root relative URL support on most commands
|
||||
* Performance improvements on huge files during update\commits
|
||||
|
||||
+ Other bugfixes and performance improvements.
|
||||
|
||||
== version 1.3.0-beta3
|
||||
|
||||
+ Changes made in Subversion since version 1.5.6 implemented,
|
||||
all Subversion 1.6.1 features are supported.
|
||||
+ Bugfixes since version 1.3.0-beta2
|
||||
|
||||
== version 1.3.0-beta2
|
||||
|
||||
+ Changes made in Subversion since version 1.5.6 implemented,
|
||||
all Subversion 1.6.1 features are supported.
|
||||
+ JavaHL implementation bugfixes.
|
||||
+ Compatibility with pre-1.6 working copies improved for
|
||||
'no working copy upgrade' cases.
|
||||
+ Update performance on large files improved.
|
||||
+ Command line client improvements.
|
||||
+ Other bugfixes and performance improvements.
|
||||
|
||||
== version 1.3.0-beta
|
||||
|
||||
+ Changes made in Subversion since version 1.5.6 implemented,
|
||||
all Subversion 1.6.1 features are supported.
|
||||
+ Merge tracking bugfixes
|
||||
+ Other bugfixes and performance improvements.
|
||||
|
||||
== version 1.2.3
|
||||
|
||||
+ Changes made in Subversion since version 1.5.5 implemented,
|
||||
all Subversion 1.5.6 features are supported.
|
||||
+ Merge tracking bugfixes
|
||||
+ Better interacting with external diff programs
|
||||
+ svnkit.no.safe.copy system property introduced for file system copy operations
|
||||
+ Other bugfixes and performance improvements.
|
||||
|
||||
== version 1.2.2
|
||||
|
||||
+ Changes made in Subversion since version 1.5.4 implemented,
|
||||
all Subversion 1.5.5 features are supported.
|
||||
+ Merge tracking implementation changed to match Subversion 1.5.5.
|
||||
+ HP-UX support added.
|
||||
+ Other stability and performance improvements.
|
||||
|
||||
== version 1.2.1
|
||||
|
||||
+ Changes made in Subversion since version 1.5.0 implemented,
|
||||
all Subversion 1.5.4 features are supported.
|
||||
+ JNA library updated to version 3.0.9.
|
||||
+ JNA-based code fixed to work properly on amd64 systems.
|
||||
+ HTTP Negotiate authentication scheme support added.
|
||||
+ "Fast" update feature has been added to SVNUpdateClient API.
|
||||
+ Command line client improvements.
|
||||
+ Other stability and performance improvements.
|
||||
|
||||
== version 1.2.0
|
||||
|
||||
+ Possible NPE on WC to URL copy operation fixed.
|
||||
+ Log operation didn't work properly with 'limit' options set to value
|
||||
larger than Integer.MAX_VALUE, fixed.
|
||||
+ OSGI manifest fixes.
|
||||
|
||||
== version 1.2.0-rc4
|
||||
|
||||
+ JNA library updated to version 3.0.5.
|
||||
+ jsvnlook 'cat' and 'lock' commands added.
|
||||
+ Update operation didn't work properly on sparse directories with 1.4.x Subversion servers, fixed.
|
||||
+ SASL: minor bugfixes.
|
||||
+ Other bugfixes.
|
||||
|
||||
== version 1.2.0-rc3
|
||||
|
||||
+ SVNKit Eclipse plugin divided into two features: core svnkit library and optional JNA library.
|
||||
+ SVNKit Eclipse plugin made compatible with base OSGI framework.
|
||||
+ SVN+SSH protocol performance improvements.
|
||||
+ File uid and guid wasn't properly fetched on OSX and BSD.
|
||||
+ Other bugfixes and minor improvements.
|
||||
|
||||
== version 1.2.0-rc2
|
||||
|
||||
+ SASL: incorrect output buffer size might result in failed commits, fixed.
|
||||
+ Possible NPE on copy operation fixed.
|
||||
|
||||
== version 1.2.0-rc1
|
||||
|
||||
+ Javadoc updated
|
||||
+ SASL authentication support bugfixes
|
||||
+ Bug in keyword expansion code fixed
|
||||
+ Other bugfixes
|
||||
|
||||
== version 1.2.0-beta5
|
||||
|
||||
+ SASL authentication support improved
|
||||
+ Java SSH Trilead library updated to build 213
|
||||
+ JNA library updated to version 3.0.4
|
||||
+ Fixed: SSH connectivity problems with non-OpenSSH servers
|
||||
+ Javadoc updated
|
||||
+ Other bugfixes
|
||||
|
||||
== version 1.2.0-beta4
|
||||
|
||||
+ Bugfixes
|
||||
|
||||
== version 1.2.0-beta3
|
||||
|
||||
+ SASL authentication support improved.
|
||||
+ Other bugfixes.
|
||||
|
||||
== version 1.2.0-beta2
|
||||
|
||||
+ JavaHL compatiblity bugfixes
|
||||
+ DAV protocol performance improvements
|
||||
|
||||
== version 1.2.0-beta
|
||||
|
||||
+ Subversion 1.5.0 features support
|
||||
|
||||
== version 1.1.7
|
||||
|
||||
+ SVNKit didn't work properly with Subversion 1.5.0 servers over svn protocol
|
||||
+ JNA library updated to version 3.0.2
|
||||
+ Trilead-SSH library updated to build 212
|
||||
+ Other bugfixes
|
||||
|
||||
== version 1.1.6
|
||||
|
||||
+ Bugfixes:
|
||||
+ Copy WC to URL sometimes didn't work properly with switched directories.
|
||||
+ Several NPEs in HTTP connection code fixed.
|
||||
+ Authentication cancellation didn't work with SSH connection in some cases.
|
||||
|
||||
== version 1.1.5
|
||||
|
||||
+ Connections pool has been improved.
|
||||
+ New version of SSH library (Trilead build 211) is used.
|
||||
+ When possible, JNA library is used for most of native calls instead of Runtime.exec(...)
|
||||
+ HTTP Digest authentications works better.
|
||||
+ Bug in keywords expansion code fixed.
|
||||
+ Other bugfixes.
|
||||
|
||||
= version 1.1.4
|
||||
|
||||
+ Connections pool closes inactive connections on timeout.
|
||||
+ Bugfixes.
|
||||
|
||||
= version 1.1.3
|
||||
|
||||
+ Encrypted credentials supported on Windows.
|
||||
+ OpenVMS support improved.
|
||||
+ Bugfixes.
|
||||
+ Daily builds now available at http://teamcity.svnkit.com/
|
||||
|
||||
= version 1.1.2
|
||||
|
||||
+ SVNKit command line client: interactive credentials prompt added.
|
||||
+ SVNKit command line client: jsvnversion added.
|
||||
+ JavaHL: SVNAdmin implemented using SVNKit API.
|
||||
+ System-wide configuration files support (e.g. /etc/subversion on Linux)
|
||||
+ bugfixes.
|
||||
|
||||
= version 1.1.1
|
||||
|
||||
+ added support for svnlook features.
|
||||
+ added support for svnadmin dump/verify/load/rmtxns/lstxns features.
|
||||
+ svn, svnadmin, svnlook and svnsync scripts are
|
||||
renamed to jsvn, jsvnadmin, jsvnlook and jsvnsync to distinguish them
|
||||
from the native programs.
|
||||
+ command line scripts supports OpenVMS.
|
||||
+ bugfixes.
|
||||
|
||||
= version 1.1.0
|
||||
|
||||
+ command line application and API to perform svnsync.
|
||||
+ bugfixes.
|
||||
|
||||
= version 1.1.0.beta5
|
||||
|
||||
+ support for Subversion 1.4 working copy and new fsfs repository format.
|
||||
+ support for new features introduced by Subversion 1.4.
|
||||
+ bugfixes.
|
||||
|
||||
= version 1.1.0.beta4
|
||||
|
||||
+ bug introduced in beta3 version fixed:
|
||||
Eclipse keyring credentials storage support was broken.
|
||||
|
||||
= version 1.1.0.beta3
|
||||
|
||||
+ Minor API improvements.
|
||||
+ Minor bugfixes.
|
||||
|
||||
= version 1.1.0.beta2
|
||||
|
||||
+ NTLM authentication method support.
|
||||
+ Javadoc updated to match new SVNKit features.
|
||||
+ Minor bugfixes.
|
||||
|
||||
= version 1.1.0.beta
|
||||
|
||||
+ 'file' protocol support (for 'fsfs' repositories).
|
||||
|
||||
= version 1.0.3
|
||||
|
||||
+ improved cancellation support
|
||||
+ improved versioned symlinks handling
|
||||
+ improved HTTP proxies support
|
||||
+ bugfixes
|
||||
|
||||
= version 1.0.2
|
||||
|
||||
+ full support of the new Subversion 1.3.0 features.
|
||||
+ ssh 'keyboard-interactive' authentication support.
|
||||
+ ssl client certificate prompt support.
|
||||
+ error codes and error messages hierarchy support in the API.
|
||||
+ utility classes to genereta operatios output in XML format.
|
||||
+ faster delta generation and delta processing code.
|
||||
+ utility API classes to process and generate deltas.
|
||||
+ documentations improved, Commit and Export examples simplified.
|
||||
+ bugfixes
|
||||
|
||||
! Note:
|
||||
This version includes minor API changes and is not binary compatible
|
||||
with the previous versions. API changes are:
|
||||
* String error messages replaced with SVNErrorMessage objects
|
||||
* ISVNFileRevisionHanlder callback interface changed
|
||||
* all callback interfaces methods now declared as throwing SVNException
|
||||
|
||||
= version 1.0.1
|
||||
|
||||
+ bugfixes
|
||||
|
||||
= version 1.0.0
|
||||
|
||||
+ documentation related improvements
|
||||
+ bugfixes
|
||||
|
||||
= version 0.9.3
|
||||
|
||||
+ licensing conditions changed
|
||||
+ support for atomic commit from different working copies
|
||||
+ persistent connections support
|
||||
+ improvements in performance and memory consumption
|
||||
+ bugfixes
|
||||
|
||||
= version 0.9.2
|
||||
|
||||
+ RC2: bugfixes related to configuration handling and svn+ssh authentication
|
||||
|
||||
= version 0.9.1
|
||||
|
||||
+ RC1: All features planned for 1.0 version are completed.
|
||||
|
||||
= version 0.8.8.1
|
||||
|
||||
+ critical bug in SVNKit Eclipse plugin fixed.
|
||||
|
||||
= version 0.8.8
|
||||
|
||||
+ http digest auth support (requires apache version > 2.0.48)
|
||||
+ wc->url and url->wc copy operations
|
||||
+ use-commit-times option support
|
||||
+ bugfixes
|
||||
|
||||
= version 0.8.7.2
|
||||
|
||||
+ Subclipse v0.9.30 compatible
|
||||
|
||||
= version 0.8.7.1
|
||||
|
||||
+ Subclipse v0.9.29 compatible
|
||||
|
||||
= version 0.8.7
|
||||
|
||||
+ http proxy support
|
||||
+ svn "keywords" are expanded properly
|
||||
+ different eol's in a file are handled correctly
|
||||
+ other minor bugfixes
|
||||
|
||||
= version 0.8.6
|
||||
|
||||
+ annotate (blame) operation is implemented.
|
||||
+ http: server socket close detected properly and doesn't result in operation failure.
|
||||
+ SVNClient: absolute paths are used in notifications.
|
||||
+ SVNClient: fileContent method traces file renames.
|
||||
+ SVNClient: list and logMessages methods return paths sorted alphabetically.
|
||||
+ SVNClient: auth info is stored in Eclipse key ring when used within Eclipse.
|
||||
|
||||
= version 0.8.5
|
||||
|
||||
+ SVNClient: WC copy and move operations work properly on Linux and OS X.
|
||||
+ SVNClient: "conflicted" status is reported correctly during update
|
||||
("merged" was reported instead).
|
||||
|
||||
= version 0.8.4
|
||||
|
||||
+ Subclipse Extension supports Subclipse 0.9.28
|
||||
+ tabulations in externals definitions processed correctly.
|
||||
|
||||
= version 0.8.3
|
||||
|
||||
+ children of copied or moved directories were not committed properly when
|
||||
their wc revision was different from the parent's one.
|
||||
+ http: all DAV requests (including commit comments) are sent in UTF-8 encoding.
|
||||
+ SvnClient: add and remove methods didn't work for directories, fixed.
|
||||
+ SvnClient: commit of single file deletion didn't work, fixed.
|
||||
+ Eclipse: SVNKit features installed from update site supports automatic update
|
||||
|
||||
= version 0.8.2
|
||||
|
||||
+ svn+ssh: persistent ssh connection is used to improve svn+ssh performance.
|
||||
+ http: problems with accessing repository location that needs different credentials then
|
||||
repository root is fixed.
|
||||
+ http: all paths in requests are canonicalized, some svn server versions failed to
|
||||
process non-canonicalized paths.
|
||||
+ wc: changes in externals were not committed correctly over http when using ISVNWorkspace.commit(...), fixed.
|
||||
+ SvnClient: diff method implemented (so that Eclipse "generate patch" action works).
|
||||
+ SvnClient: copy and move methods fixed to work properly in Subclipse repository view.
|
||||
+ SvnClient: setPrompt support, better notifications, "windows" paths are handled correctly.
|
||||
+ logging: Pluggable loggers support and detailed http logging added (thanks to Marc Strapez).
|
||||
+ logging: Eclipse SVNKit version uses Eclipse logging facilities.
|
||||
|
||||
= version 0.8.1
|
||||
|
||||
+ bugs with committing files within moved directories fixed
|
||||
+ bugfixes related to operations over http connection
|
||||
+ for subclipse users: more detailed console notifications on svn operations
|
||||
|
||||
= version 0.8.0
|
||||
|
||||
+ new builds versioning schema introduced
|
||||
+ update site with eclipse plugin and subclipse extension added
|
||||
|
||||
= build 20050131
|
||||
|
||||
+ import works properly with single file and when importing to
|
||||
non-yet-existing directories
|
||||
+ switch works properly when switching single file
|
||||
+ more minor bugfixes
|
||||
|
||||
= build 20050120
|
||||
|
||||
+ bugs with commiting locally copied files fixed
|
||||
+ DAV '/' repository location handled correctly
|
||||
|
||||
= build 20050112
|
||||
|
||||
+ lot of incompatibilities with native svn fixed
|
||||
+ SVNClient supports remote deletion, copy and move operations
|
||||
|
||||
= build 20050106
|
||||
|
||||
+ number of bugs in remote status implementation fixed
|
||||
+ ISVNWorkspace.getFileContent method restored to keep binary compatibility
|
||||
+ Diff generators framework added, now SVNKit provides API for
|
||||
generating diff in different formats ('unified' and 'normal') for arbitrary
|
||||
input sources
|
||||
|
||||
= build 20050105
|
||||
|
||||
+ svn+ssh authentication failed to work in some cases - fixed
|
||||
+ revisions in working copy now updated correctly after update
|
||||
+ got rid of number of minor inconsistences between SVNKit and native SVN
|
||||
+ http and https protocols supports compressed data (gzip)
|
||||
|
||||
= build 20041223
|
||||
|
||||
+ ISVNWorkspace.delete now accepts 'force' parameter
|
||||
+ bug fixed that prevented Subclipse committing single
|
||||
file in non-windows systems
|
||||
+ complete svn and svn+ssh protocol logging may be enabled
|
||||
with -Dsvnkit.log.svn=true command line switch
|
||||
|
||||
= build 20041221
|
||||
|
||||
+ when using svn+ssh SVNKit takes private key path from the java property,
|
||||
if it is not defined explicitly
|
||||
+ svn+ssh bugfixes
|
||||
+ bugfixes
|
||||
|
||||
= build 20041219
|
||||
|
||||
+ infinite loop on commits that includes workspace root fixed
|
||||
+ JavaHL: SVNClient accepts all revision kinds (DATE, HEAD, etc.)
|
||||
|
||||
= build 20041217
|
||||
|
||||
+ bugfixes
|
||||
|
||||
= build 20041216
|
||||
|
||||
+ bugfixes
|
||||
|
||||
= build 20041211
|
||||
|
||||
+ command line svn client (status, import, checkout are implemented)
|
||||
+ python tests launcher to reuse original svn python tests suite
|
||||
+ bugfixes
|
||||
|
||||
= build 20041209
|
||||
|
||||
+ bugfixes
|
||||
|
||||
= build 20041204
|
||||
|
||||
+ bugfixes
|
||||
+ SVNKit works with Subclipse 0.9.24
|
||||
|
||||
= build 20041130
|
||||
|
||||
+ bugfixes
|
||||
|
||||
= build 20041126
|
||||
|
||||
+ svn+shh protocol support (with the jsch library)
|
||||
+ bugfixes
|
||||
|
||||
= build 20041124
|
||||
|
||||
+ javahl copy, move and mkdir methods implementation
|
||||
+ methods to manage global ignore added to ISVNWorkspace
|
||||
+ bugfixes
|
||||
|
||||
= build 20041123
|
||||
|
||||
+ recursive property set operation
|
||||
+ ISVNWorkspace accepts credentials provider
|
||||
+ SSLContext made pluggable
|
||||
+ javahl replacement works with Subclipse
|
||||
+ bugfixes
|
||||
|
||||
= build 20041118
|
||||
|
||||
+ javahl implementation (SvnClient) is included into the library
|
||||
+ workspace accepts credentials provider
|
||||
|
||||
= build 20041116
|
||||
|
||||
+ bugfixes
|
||||
|
||||
= build 20041110
|
||||
|
||||
+ svn:externals support
|
||||
+ bugfixes
|
||||
|
||||
= build 20041109
|
||||
|
||||
+ bug that prevents checkout sometimes fixed
|
||||
|
||||
= build 20041108
|
||||
|
||||
+ authentication API simplified
|
||||
+ performance improvements
|
||||
+ bugfixes
|
||||
|
||||
= build 20041105
|
||||
|
||||
+ switch and relocate operations
|
||||
+ bugfixes
|
||||
|
Before Width: | Height: | Size: 319 B |
|
Before Width: | Height: | Size: 170 B |
|
Before Width: | Height: | Size: 576 B |
|
Before Width: | Height: | Size: 590 B |
|
Before Width: | Height: | Size: 604 B |
|
Before Width: | Height: | Size: 339 B |
|
Before Width: | Height: | Size: 319 B |
|
Before Width: | Height: | Size: 364 B |
|
Before Width: | Height: | Size: 673 B |
|
Before Width: | Height: | Size: 340 B |
|
Before Width: | Height: | Size: 370 B |
|
Before Width: | Height: | Size: 335 B |
|
Before Width: | Height: | Size: 731 B |
|
Before Width: | Height: | Size: 757 B |
|
Before Width: | Height: | Size: 385 B |
|
Before Width: | Height: | Size: 391 B |
|
Before Width: | Height: | Size: 703 B |
|
Before Width: | Height: | Size: 412 B |