mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -50,10 +50,12 @@ jrePlatformsToDownload(targetOs).each { platform ->
|
||||
commandLine 'tar', '-xpf', "${downloadOutputs.singleFile.absolutePath}", '--directory', outputDir
|
||||
if (platform != 'osx') {
|
||||
doLast {
|
||||
exec {
|
||||
commandLine 'mv', "$outputDir/lib/tools.jar", "$outputDir/jre/lib/"
|
||||
ignoreExitValue = true
|
||||
}
|
||||
if (file("$outputDir/lib/tools.jar").exists()) {
|
||||
exec {
|
||||
commandLine 'mv', "$outputDir/lib/tools.jar", "$outputDir/jre/lib/"
|
||||
ignoreExitValue = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,6 +31,10 @@
|
||||
serviceImplementation="com.intellij.openapi.vcs.impl.CodeSmellDetectorImpl"/>
|
||||
<projectService serviceImplementation="com.intellij.openapi.vcs.changes.VcsDirtyScopeVfsListener" />
|
||||
<projectService serviceImplementation="com.intellij.vcs.commit.CommitMessageInspectionProfile"/>
|
||||
<projectService serviceInterface="com.intellij.openapi.vcs.contentAnnotation.VcsContentAnnotation"
|
||||
serviceImplementation="com.intellij.openapi.vcs.contentAnnotation.VcsContentAnnotationImpl"/>
|
||||
<projectService serviceInterface="com.intellij.openapi.vcs.contentAnnotation.ContentAnnotationCache"
|
||||
serviceImplementation="com.intellij.openapi.vcs.contentAnnotation.ContentAnnotationCacheImpl"/>
|
||||
|
||||
<daemon.intentionActionFilter implementation="com.intellij.vcs.commit.BaseCommitMessageInspection$EmptyIntentionActionFilter"/>
|
||||
|
||||
|
||||
@@ -97,9 +97,5 @@
|
||||
<component><interface-class>com.intellij.openapi.vcs.impl.VcsBaseContentProvider</interface-class>
|
||||
<implementation-class>com.intellij.openapi.vcs.impl.VcsFileStatusProvider</implementation-class>
|
||||
</component>
|
||||
<component><interface-class>com.intellij.openapi.vcs.contentAnnotation.VcsContentAnnotation</interface-class>
|
||||
<implementation-class>com.intellij.openapi.vcs.contentAnnotation.VcsContentAnnotationImpl</implementation-class></component>
|
||||
<component><interface-class>com.intellij.openapi.vcs.contentAnnotation.ContentAnnotationCache</interface-class>
|
||||
<implementation-class>com.intellij.openapi.vcs.contentAnnotation.ContentAnnotationCacheImpl</implementation-class></component>
|
||||
</project-components>
|
||||
</idea-plugin>
|
||||
|
||||
@@ -266,12 +266,19 @@ public abstract class JBIterable<E> implements Iterable<E> {
|
||||
*/
|
||||
@Nullable
|
||||
public final E get(int index) {
|
||||
if (myIterable instanceof List) {
|
||||
return index >= ((List)myIterable).size() ? null : ((List<E>)myIterable).get(index);
|
||||
List<E> list = asRandomAccess(myIterable);
|
||||
if (list != null) {
|
||||
return index >= list.size() ? null : list.get(index);
|
||||
}
|
||||
return skip(index).first();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private static <E> List<E> asRandomAccess(@Nullable Iterable<E> iterable) {
|
||||
//noinspection CastConflictsWithInstanceof
|
||||
return iterable instanceof RandomAccess? (List<E>)iterable : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a {@code JBIterable} which iterators traverse first the elements of this iterable,
|
||||
* followed by those of {@code other}. The iterators are not polled until necessary.
|
||||
@@ -464,8 +471,9 @@ public abstract class JBIterable<E> implements Iterable<E> {
|
||||
*/
|
||||
@Nullable
|
||||
public final E first() {
|
||||
if (myIterable instanceof List) {
|
||||
return ((List)myIterable).isEmpty() ? null : ((List<E>)myIterable).get(0);
|
||||
List<E> list = asRandomAccess(myIterable);
|
||||
if (list != null) {
|
||||
return list.isEmpty() ? null : list.get(0);
|
||||
}
|
||||
Iterator<E> iterator = myIterable.iterator();
|
||||
return iterator.hasNext() ? iterator.next() : null;
|
||||
@@ -476,8 +484,9 @@ public abstract class JBIterable<E> implements Iterable<E> {
|
||||
*/
|
||||
@Nullable
|
||||
public final E single() {
|
||||
if (myIterable instanceof List) {
|
||||
return ((List)myIterable).size() != 1 ? null : (E)((List)myIterable).get(0);
|
||||
List<E> list = asRandomAccess(myIterable);
|
||||
if (list != null) {
|
||||
return list.size() != 1 ? null : list.get(0);
|
||||
}
|
||||
Iterator<E> iterator = myIterable.iterator();
|
||||
E first = iterator.hasNext() ? iterator.next() : null;
|
||||
@@ -489,8 +498,9 @@ public abstract class JBIterable<E> implements Iterable<E> {
|
||||
*/
|
||||
@Nullable
|
||||
public final E last() {
|
||||
if (myIterable instanceof List) {
|
||||
return ((List)myIterable).isEmpty() ? null : (E)((List)myIterable).get(((List)myIterable).size() - 1);
|
||||
List<E> list = asRandomAccess(myIterable);
|
||||
if (list != null) {
|
||||
return list.isEmpty() ? null : list.get(list.size() - 1);
|
||||
}
|
||||
E cur = null;
|
||||
for (E e : myIterable) {
|
||||
|
||||
+3
-1
@@ -49,7 +49,9 @@ public interface CommittedChangeList extends ChangeList {
|
||||
*/
|
||||
AbstractVcs getVcs();
|
||||
|
||||
Collection<Change> getChangesWithMovedTrees();
|
||||
default Collection<Change> getChangesWithMovedTrees() {
|
||||
return getChanges();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if this change list can be modified, for example, by reverting some of the changes.
|
||||
|
||||
-8
@@ -63,10 +63,6 @@ public class CommittedChangeListImpl implements CommittedChangeList {
|
||||
return null;
|
||||
}
|
||||
|
||||
public Collection<Change> getChangesWithMovedTrees() {
|
||||
return getChangesWithMovedTreesImpl(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isModifiable() {
|
||||
return true;
|
||||
@@ -77,10 +73,6 @@ public class CommittedChangeListImpl implements CommittedChangeList {
|
||||
myComment = newMessage;
|
||||
}
|
||||
|
||||
public static Collection<Change> getChangesWithMovedTreesImpl(final CommittedChangeList list) {
|
||||
return list.getChanges();
|
||||
}
|
||||
|
||||
public Collection<Change> getChanges() {
|
||||
return myChanges;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,6 @@ import com.intellij.openapi.vcs.AbstractVcs;
|
||||
import com.intellij.openapi.vcs.changes.Change;
|
||||
import com.intellij.openapi.vcs.changes.ContentRevision;
|
||||
import com.intellij.openapi.vcs.versionBrowser.CommittedChangeList;
|
||||
import com.intellij.openapi.vcs.versionBrowser.CommittedChangeListImpl;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.util.io.IOUtil;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
@@ -110,10 +109,6 @@ public class CvsChangeList implements CommittedChangeList {
|
||||
return CvsVcs2.getInstance(myProject);
|
||||
}
|
||||
|
||||
public Collection<Change> getChangesWithMovedTrees() {
|
||||
return CommittedChangeListImpl.getChangesWithMovedTreesImpl(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isModifiable() {
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user