mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Unnecessary qualifiers removed, some other cleanup
GitOrigin-RevId: 906af988c0b66ecaee588dfb5e16a1801051df97
This commit is contained in:
committed by
intellij-monorepo-bot
parent
713978d722
commit
128370d4e3
@@ -22,13 +22,13 @@ import java.util.Map;
|
||||
* Simple processing context can contain a shared processing context inside, which should be used when iterating over several patterns
|
||||
* or extensions, possibly from different plugins. They may still wish to reuse some cached information that a previous extension has already calculated.
|
||||
* <p/>
|
||||
* In this case, a separate ProcessingContext object is created for each of those extensions, but the same {@link com.intellij.util.SharedProcessingContext}
|
||||
* In this case, a separate ProcessingContext object is created for each of those extensions, but the same {@link SharedProcessingContext}
|
||||
* is passed to their constructors. To reuse shared context, extensions are required to work with {@link #getSharedContext()} result.
|
||||
* <p/>
|
||||
* Not thread-safe.
|
||||
*
|
||||
* @see #get(com.intellij.openapi.util.Key)
|
||||
* @see #put(com.intellij.openapi.util.Key, Object)
|
||||
* @see #get(Key)
|
||||
* @see #put(Key, Object)
|
||||
* @see #ProcessingContext(SharedProcessingContext)
|
||||
* @author peter
|
||||
*/
|
||||
|
||||
@@ -11,7 +11,7 @@ import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
/**
|
||||
* Reports exceptions thrown from frequently called methods (e.g. {@link java.awt.Component#paint(Graphics)}),
|
||||
* Reports exceptions thrown from frequently called methods (e.g. {@link Component#paint(Graphics)}),
|
||||
* so that instead of polluting the log with hundreds of {@link Logger#error(Throwable) LOG.errors} it prints the error message
|
||||
* and the stacktrace once in a while.
|
||||
*/
|
||||
|
||||
@@ -30,7 +30,7 @@ class JBZipOutputStream {
|
||||
|
||||
private final CRC32 crc = new CRC32();
|
||||
|
||||
private long writtenOnDisk = 0;
|
||||
private long writtenOnDisk;
|
||||
|
||||
/**
|
||||
* The encoding to use for filenames and the file comment.
|
||||
@@ -46,7 +46,7 @@ class JBZipOutputStream {
|
||||
* <p/>
|
||||
* <p>This attribute is only protected to provide a level of API
|
||||
* backwards compatibility. This class used to extend {@link
|
||||
* java.util.zip.DeflaterOutputStream DeflaterOutputStream} up to
|
||||
* DeflaterOutputStream DeflaterOutputStream} up to
|
||||
* Revision 1.13.</p>
|
||||
*/
|
||||
private final Deflater def = new Deflater(level, true);
|
||||
@@ -63,9 +63,8 @@ class JBZipOutputStream {
|
||||
*
|
||||
* @param file the file to zip to
|
||||
* @param currentCDOffset
|
||||
* @throws IOException on error
|
||||
*/
|
||||
JBZipOutputStream(JBZipFile file, long currentCDOffset) throws IOException {
|
||||
JBZipOutputStream(JBZipFile file, long currentCDOffset) {
|
||||
myFile = file;
|
||||
raf = myFile.archive;
|
||||
writtenOnDisk = currentCDOffset;
|
||||
@@ -94,7 +93,7 @@ class JBZipOutputStream {
|
||||
}
|
||||
|
||||
/**
|
||||
* Finishs writing the contents and closes this as well as the
|
||||
* Finishes writing the contents and closes this as well as the
|
||||
* underlying stream.
|
||||
*
|
||||
* @throws IOException on error
|
||||
@@ -102,8 +101,8 @@ class JBZipOutputStream {
|
||||
public void finish() throws IOException {
|
||||
long cdOffset = getWritten();
|
||||
final List<JBZipEntry> entries = myFile.getEntries();
|
||||
for (int i = 0, entriesSize = entries.size(); i < entriesSize; i++) {
|
||||
writeCentralFileHeader(entries.get(i));
|
||||
for (JBZipEntry entry : entries) {
|
||||
writeCentralFileHeader(entry);
|
||||
}
|
||||
long cdLength = getWritten() - cdOffset;
|
||||
writeCentralDirectoryEnd(cdLength, cdOffset);
|
||||
@@ -327,6 +326,8 @@ class JBZipOutputStream {
|
||||
writeOut(data, 0, data.length);
|
||||
}
|
||||
|
||||
private final BufferExposingByteArrayOutputStream myBuffer = new BufferExposingByteArrayOutputStream();
|
||||
|
||||
/**
|
||||
* Write bytes to output or random access file.
|
||||
*
|
||||
@@ -335,8 +336,6 @@ class JBZipOutputStream {
|
||||
* @param length the number of bytes to write
|
||||
* @throws IOException on error
|
||||
*/
|
||||
private final BufferExposingByteArrayOutputStream myBuffer = new BufferExposingByteArrayOutputStream();
|
||||
|
||||
private void writeOut(byte[] data, int offset, int length) throws IOException {
|
||||
myBuffer.write(data, offset, length);
|
||||
if (myBuffer.size() > 8192) {
|
||||
|
||||
@@ -21,11 +21,12 @@ import com.intellij.util.text.StringTokenizer;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Properties;
|
||||
|
||||
/**
|
||||
* @author MYakovlev
|
||||
*/
|
||||
public class EncodingAwareProperties extends java.util.Properties{
|
||||
public class EncodingAwareProperties extends Properties{
|
||||
public void load(File file, String encoding) throws IOException{
|
||||
String propText = FileUtil.loadFile(file, encoding);
|
||||
propText = StringUtil.convertLineSeparators(propText);
|
||||
|
||||
@@ -194,7 +194,7 @@ public class GridBag extends GridBagConstraints {
|
||||
|
||||
|
||||
/**
|
||||
* @see #insets(java.awt.Insets)
|
||||
* @see #insets(Insets)
|
||||
*/
|
||||
@NotNull
|
||||
public GridBag insets(int top, int left, int bottom, int right) {
|
||||
|
||||
@@ -10,7 +10,7 @@ import java.awt.*;
|
||||
* @author Vassiliy Kudryashov
|
||||
* @author Konstantin Bulenkov
|
||||
*
|
||||
* @deprecated use {@link com.intellij.util.ui.ColorsIcon} instead
|
||||
* @deprecated use {@link ColorsIcon} instead
|
||||
*/
|
||||
@Deprecated
|
||||
public class TwoColorsIcon extends ColorsIcon {
|
||||
|
||||
@@ -4,6 +4,7 @@ package com.intellij.openapi.vcs;
|
||||
import com.intellij.ide.errorTreeView.HotfixData;
|
||||
import com.intellij.openapi.components.ServiceManager;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.NlsContexts;
|
||||
import com.intellij.openapi.util.NlsContexts.TabTitle;
|
||||
import com.intellij.openapi.vcs.annotate.AnnotationProvider;
|
||||
import com.intellij.openapi.vcs.annotate.FileAnnotation;
|
||||
@@ -17,7 +18,6 @@ import com.intellij.openapi.vcs.merge.MergeProvider;
|
||||
import com.intellij.openapi.vcs.versionBrowser.ChangeBrowserSettings;
|
||||
import com.intellij.openapi.vcs.versionBrowser.CommittedChangeList;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.openapi.util.NlsContexts;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -88,7 +88,7 @@ public abstract class AbstractVcsHelper {
|
||||
public abstract @NotNull List<VirtualFile> showMergeDialog(List<? extends VirtualFile> files, MergeProvider provider, @NotNull MergeDialogCustomizer mergeDialogCustomizer);
|
||||
|
||||
/**
|
||||
* {@link #showMergeDialog(java.util.List, com.intellij.openapi.vcs.merge.MergeProvider)} without description.
|
||||
* {@link #showMergeDialog(List, MergeProvider, MergeDialogCustomizer)} without description.
|
||||
*/
|
||||
@NotNull
|
||||
public final List<VirtualFile> showMergeDialog(List<? extends VirtualFile> files, MergeProvider provider) {
|
||||
@@ -96,7 +96,7 @@ public abstract class AbstractVcsHelper {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@link #showMergeDialog(java.util.List, com.intellij.openapi.vcs.merge.MergeProvider)} without description and with default merge provider
|
||||
* {@link #showMergeDialog(java.util.List, MergeProvider)} without description and with default merge provider
|
||||
* for the current VCS.
|
||||
*/
|
||||
@NotNull
|
||||
|
||||
@@ -19,9 +19,9 @@ import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.NlsContexts;
|
||||
import com.intellij.openapi.vcs.changes.Change;
|
||||
import com.intellij.openapi.vcs.changes.CommitContext;
|
||||
import com.intellij.vcs.commit.CommitWorkflowHandler;
|
||||
import com.intellij.openapi.vcs.ui.Refreshable;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.vcs.commit.CommitWorkflowHandler;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -61,7 +61,7 @@ public interface CheckinProjectPanel extends Refreshable, CommitMessageI {
|
||||
Collection<Change> getSelectedChanges();
|
||||
|
||||
/**
|
||||
* Returns the list of files selected for checkin, as {@link java.io.File} objects. The returned list
|
||||
* Returns the list of files selected for checkin, as {@link File} objects. The returned list
|
||||
* includes files which will be deleted from the VCS during the check-in operation.
|
||||
*
|
||||
* @return the files selected for checkin.
|
||||
|
||||
@@ -7,7 +7,7 @@ import com.intellij.openapi.vfs.VirtualFile;
|
||||
* VCS interface for invoking "check out"/"edit file" operations.
|
||||
*
|
||||
* @author lesya
|
||||
* @see com.intellij.openapi.vcs.AbstractVcs#getEditFileProvider()
|
||||
* @see AbstractVcs#getEditFileProvider()
|
||||
*/
|
||||
public interface EditFileProvider {
|
||||
/**
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
package com.intellij.openapi.vcs;
|
||||
|
||||
/**
|
||||
* @see com.intellij.openapi.vcs.AbstractVcs#getType()
|
||||
* @see AbstractVcs#getType()
|
||||
*/
|
||||
public enum VcsType {
|
||||
centralized,
|
||||
|
||||
@@ -29,7 +29,7 @@ public interface BinaryContentRevision extends ByteBackedContentRevision {
|
||||
* Might return null in case if file path denotes a directory or content is impossible to retrieve.
|
||||
*
|
||||
* @return content of the revision
|
||||
* @throws com.intellij.openapi.vcs.VcsException in case when content retrieval fails
|
||||
* @throws VcsException in case when content retrieval fails
|
||||
*/
|
||||
byte @Nullable [] getBinaryContent() throws VcsException;
|
||||
|
||||
|
||||
@@ -11,8 +11,8 @@ import java.util.EventListener;
|
||||
/**
|
||||
* @author max
|
||||
*
|
||||
* @see com.intellij.openapi.vcs.changes.ChangeListManager#addChangeListListener(ChangeListListener)
|
||||
* @see com.intellij.openapi.vcs.changes.ChangeListManager#removeChangeListListener(ChangeListListener)
|
||||
* @see ChangeListManager#addChangeListListener(ChangeListListener)
|
||||
* @see ChangeListManager#removeChangeListListener(ChangeListListener)
|
||||
*/
|
||||
public interface ChangeListListener extends EventListener {
|
||||
Topic<ChangeListListener> TOPIC = Topic.create("VCS changelists changed", ChangeListListener.class);
|
||||
|
||||
@@ -32,7 +32,7 @@ public interface DiffFromHistoryHandler {
|
||||
* Show diff when a single revision is selected in the file history panel.
|
||||
* @param e AnActionEvent which happened, when user invoked "Show Diff".
|
||||
* @param filePath the file which history is shown.
|
||||
* @param previousRevision the previous revision in the list displayed file history panel, may be {@link com.intellij.openapi.vcs.history.VcsFileRevision#NULL}.
|
||||
* @param previousRevision the previous revision in the list displayed file history panel, may be {@link VcsFileRevision#NULL}.
|
||||
* @param revision the revision selected in the file history panel.
|
||||
*/
|
||||
void showDiffForOne(@NotNull AnActionEvent e,
|
||||
|
||||
@@ -14,8 +14,8 @@ import java.util.List;
|
||||
* Container for files which have been affected by an update/integrate/status operation.
|
||||
* The files are grouped by file status.
|
||||
*
|
||||
* @see com.intellij.openapi.vcs.update.UpdateEnvironment#fillGroups
|
||||
* @see com.intellij.openapi.vcs.update.UpdateEnvironment#updateDirectories
|
||||
* @see UpdateEnvironment#fillGroups
|
||||
* @see UpdateEnvironment#updateDirectories
|
||||
*/
|
||||
public class UpdatedFiles implements JDOMExternalizable {
|
||||
private final List<FileGroup> myGroups = new ArrayList<>();
|
||||
|
||||
@@ -23,7 +23,7 @@ public class ChangesViewContentEP implements PluginAware {
|
||||
public static final ProjectExtensionPointName<ChangesViewContentEP> EP_NAME = new ProjectExtensionPointName<>("com.intellij.changesViewContent");
|
||||
|
||||
/**
|
||||
* Used to determine specific tab content in {@link com.intellij.openapi.vcs.changes.ui.ChangesViewContentManager#selectContent}
|
||||
* Used to determine specific tab content in {@link ChangesViewContentManager#selectContent}
|
||||
* <p>
|
||||
* To provide localized tab name use {@link #displayNameSupplierClassName}
|
||||
*/
|
||||
|
||||
@@ -63,7 +63,7 @@ public class RollbackUtil {
|
||||
|
||||
/**
|
||||
* Finds the appropriate name for the "rollback" operation, looking through all VCSs registered in the project.
|
||||
* @see #getRollbackOperationName(java.util.Collection)
|
||||
* @see #getRollbackOperationName(Collection)
|
||||
*/
|
||||
@NotNull
|
||||
public static String getRollbackOperationName(@NotNull Project project) {
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ public class VcsLogStructureFilterImpl implements VcsLogDetailsFilter, VcsLogStr
|
||||
@NotNull private final Collection<FilePath> myFiles;
|
||||
|
||||
/**
|
||||
* Use {@link com.intellij.vcs.log.visible.filters.VcsLogFilterObject#fromPaths(Collection)}
|
||||
* Use {@link VcsLogFilterObject#fromPaths(Collection)}
|
||||
*/
|
||||
protected VcsLogStructureFilterImpl(@NotNull Collection<FilePath> files) {
|
||||
myFiles = files;
|
||||
|
||||
+1
-1
@@ -44,7 +44,7 @@ public abstract class XSmartStepIntoHandler<Variant extends XSmartStepIntoVarian
|
||||
}
|
||||
|
||||
/**
|
||||
* Resume execution and call {@link com.intellij.xdebugger.XDebugSession#positionReached(XSuspendContext)}
|
||||
* Resume execution and call {@link XDebugSession#positionReached(XSuspendContext)}
|
||||
* when {@code variant} function/method is reached
|
||||
* @param variant selected variant
|
||||
*/
|
||||
|
||||
+1
-1
@@ -93,7 +93,7 @@ public class ParenthesesUtils {
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated use {@link PsiUtil#skipParenthesizedExprDown(com.intellij.psi.PsiExpression)} directly instead
|
||||
* @deprecated use {@link PsiUtil#skipParenthesizedExprDown(PsiExpression)} directly instead
|
||||
*/
|
||||
@Deprecated
|
||||
@Contract("null -> null")
|
||||
|
||||
@@ -27,7 +27,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
public class ExtendsThreadInspection extends BaseInspection {
|
||||
|
||||
/**
|
||||
* @see com.siyeh.ig.inheritance.ExtendsConcreteCollectionInspection#buildFix(java.lang.Object...)
|
||||
* @see com.siyeh.ig.inheritance.ExtendsConcreteCollectionInspection#buildFix(Object...)
|
||||
*/
|
||||
@Override
|
||||
protected InspectionGadgetsFix buildFix(Object... infos) {
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ import java.util.Collection;
|
||||
|
||||
/**
|
||||
* This class seems to used from a third-party plugin (https://plugins.jetbrains.com/plugin/7688-eddy) and can't be removed.
|
||||
* @see com.siyeh.ig.style.UnnecessaryFullyQualifiedNameInspection
|
||||
* @see UnnecessaryFullyQualifiedNameInspection
|
||||
*/
|
||||
public class ReplaceFullyQualifiedNameWithImportIntention extends Intention {
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ public final class ExecutionHandler {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param antBuildListener should not be null. Use {@link com.intellij.lang.ant.config.AntBuildListener#NULL}
|
||||
* @param antBuildListener should not be null. Use {@link AntBuildListener#NULL}
|
||||
*/
|
||||
public static void runBuild(final AntBuildFileBase buildFile,
|
||||
List<String> targets,
|
||||
@@ -93,7 +93,7 @@ public final class ExecutionHandler {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param antBuildListener should not be null. Use {@link com.intellij.lang.ant.config.AntBuildListener#NULL}
|
||||
* @param antBuildListener should not be null. Use {@link AntBuildListener#NULL}
|
||||
*/
|
||||
@Nullable
|
||||
private static FutureResult<ProcessHandler> runBuildImpl(final AntBuildFileBase buildFile,
|
||||
|
||||
@@ -12,7 +12,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
public interface CoverageAnnotator {
|
||||
/**
|
||||
*
|
||||
* @param directory {@link com.intellij.psi.PsiDirectory} to obtain coverage information for
|
||||
* @param directory {@link PsiDirectory} to obtain coverage information for
|
||||
* @param manager
|
||||
* @return human-readable coverage information
|
||||
*/
|
||||
@@ -23,7 +23,7 @@ public interface CoverageAnnotator {
|
||||
|
||||
/**
|
||||
*
|
||||
* @param file {@link com.intellij.psi.PsiFile} to obtain coverage information for
|
||||
* @param file {@link PsiFile} to obtain coverage information for
|
||||
* @param manager
|
||||
* @return human-readable coverage information
|
||||
*/
|
||||
|
||||
@@ -80,7 +80,7 @@ public abstract class CoverageDataManager {
|
||||
* runs computation in read action, blocking project close till action has been run,
|
||||
* and doing nothing in case projectClosing() event has been already broadcasted.
|
||||
* Note that actions must not be long running not to cause significant pauses on project close.
|
||||
* @param computation {@link com.intellij.openapi.util.Computable to be run}
|
||||
* @param computation {@link Computable to be run}
|
||||
* @return result of the computation or null if the project is already closing.
|
||||
*/
|
||||
@Nullable
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
package com.intellij.coverage.listeners;
|
||||
|
||||
import com.intellij.rt.coverage.data.ProjectData;
|
||||
import com.intellij.rt.testng.IDEATestNGListener;
|
||||
import org.testng.ITestContext;
|
||||
import org.testng.ITestResult;
|
||||
|
||||
public class IDEATestNGCoverageListener extends CoverageListener implements IDEATestNGListener {
|
||||
|
||||
@Override
|
||||
public void onTestStart(final ITestResult iTestResult) {
|
||||
final Object data = getData();
|
||||
if (data != null) {
|
||||
((com.intellij.rt.coverage.data.ProjectData)data).testStarted(getSanitizeTestName(iTestResult));
|
||||
((ProjectData)data).testStarted(getSanitizeTestName(iTestResult));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,34 +19,40 @@ public class IDEATestNGCoverageListener extends CoverageListener implements IDEA
|
||||
return sanitize(iTestResult.getTestClass().getName(), iTestResult.getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTestSuccess(final ITestResult iTestResult) {
|
||||
final Object data = getData();
|
||||
if (data != null) {
|
||||
((com.intellij.rt.coverage.data.ProjectData)data).testEnded(getSanitizeTestName(iTestResult));
|
||||
((ProjectData)data).testEnded(getSanitizeTestName(iTestResult));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTestFailure(final ITestResult iTestResult) {
|
||||
final Object data = getData();
|
||||
if (data != null) {
|
||||
((com.intellij.rt.coverage.data.ProjectData)data).testEnded(getSanitizeTestName(iTestResult));
|
||||
((ProjectData)data).testEnded(getSanitizeTestName(iTestResult));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTestSkipped(final ITestResult iTestResult) {
|
||||
final Object data = getData();
|
||||
if (data != null) {
|
||||
((com.intellij.rt.coverage.data.ProjectData)data).testEnded(getSanitizeTestName(iTestResult));
|
||||
((ProjectData)data).testEnded(getSanitizeTestName(iTestResult));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTestFailedButWithinSuccessPercentage(final ITestResult iTestResult) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStart(final ITestContext iTestContext) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFinish(final ITestContext iTestContext) {
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.intellij.cvsSupport2.actions;
|
||||
|
||||
import com.intellij.CvsBundle;
|
||||
import com.intellij.cvsSupport2.CvsVcs2;
|
||||
import com.intellij.cvsSupport2.actions.cvsContext.CvsContext;
|
||||
import com.intellij.cvsSupport2.actions.cvsContext.CvsContextWrapper;
|
||||
@@ -51,7 +52,7 @@ public class EditAction extends AbstractActionFromEditGroup {
|
||||
|
||||
@Override
|
||||
protected String getTitle(VcsContext context) {
|
||||
return com.intellij.CvsBundle.message("action.name.edit");
|
||||
return CvsBundle.message("action.name.edit");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.intellij.cvsSupport2.actions;
|
||||
|
||||
import com.intellij.CvsBundle;
|
||||
import com.intellij.openapi.vcs.actions.VcsContext;
|
||||
import org.netbeans.lib.cvsclient.command.watch.WatchMode;
|
||||
|
||||
@@ -24,7 +25,7 @@ import org.netbeans.lib.cvsclient.command.watch.WatchMode;
|
||||
public class WatchOffAction extends AbstractWatchOnOffAction {
|
||||
@Override
|
||||
protected String getTitle(VcsContext context) {
|
||||
return com.intellij.CvsBundle.message("operation.name.watching.off");
|
||||
return CvsBundle.message("operation.name.watching.off");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.intellij.cvsSupport2.actions;
|
||||
|
||||
import com.intellij.CvsBundle;
|
||||
import com.intellij.openapi.vcs.actions.VcsContext;
|
||||
import org.netbeans.lib.cvsclient.command.watch.WatchMode;
|
||||
|
||||
@@ -24,7 +25,7 @@ import org.netbeans.lib.cvsclient.command.watch.WatchMode;
|
||||
public class WatchOnAction extends AbstractWatchOnOffAction {
|
||||
@Override
|
||||
protected String getTitle(VcsContext context) {
|
||||
return com.intellij.CvsBundle.message("operation.name.watching.on");
|
||||
return CvsBundle.message("operation.name.watching.on");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.intellij.cvsSupport2.actions;
|
||||
|
||||
import com.intellij.CvsBundle;
|
||||
import com.intellij.cvsSupport2.config.CvsConfiguration;
|
||||
import com.intellij.cvsSupport2.cvsoperations.cvsWatch.ui.WatcherDialog;
|
||||
import com.intellij.openapi.vcs.actions.VcsContext;
|
||||
@@ -27,7 +28,7 @@ import org.netbeans.lib.cvsclient.command.watch.WatchMode;
|
||||
public class WatchRemoveAction extends AbstractWatchAction {
|
||||
@Override
|
||||
protected String getTitle(VcsContext context) {
|
||||
return com.intellij.CvsBundle.message("operation.name.watching.remove");
|
||||
return CvsBundle.message("operation.name.watching.remove");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+2
-1
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.intellij.cvsSupport2.connections.ssh.ui;
|
||||
|
||||
import com.intellij.CvsBundle;
|
||||
import com.intellij.openapi.ui.DialogWrapper;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
@@ -32,7 +33,7 @@ public class SshPasswordDialog extends DialogWrapper{
|
||||
public SshPasswordDialog(String propmtText) {
|
||||
super(true);
|
||||
myLabel.setText(propmtText);
|
||||
setTitle(com.intellij.CvsBundle.message("dialog.title.ssh.password"));
|
||||
setTitle(CvsBundle.message("dialog.title.ssh.password"));
|
||||
init();
|
||||
myAdditionalLbl.setForeground(UIUtil.getInactiveTextColor());
|
||||
myAdditionalLbl.setVisible(false);
|
||||
|
||||
+3
-1
@@ -15,11 +15,13 @@
|
||||
*/
|
||||
package com.intellij.cvsSupport2.cvsBrowser;
|
||||
|
||||
import com.intellij.CvsBundle;
|
||||
|
||||
/**
|
||||
* author: lesya
|
||||
*/
|
||||
public class LoginAbortedException extends RuntimeException{
|
||||
public LoginAbortedException() {
|
||||
super(com.intellij.CvsBundle.message("exception.text.cannot.login.to.cvs"));
|
||||
super(CvsBundle.message("exception.text.cannot.login.to.cvs"));
|
||||
}
|
||||
}
|
||||
|
||||
+2
-1
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.intellij.cvsSupport2.cvsoperations.cvsAdd.ui;
|
||||
|
||||
import com.intellij.CvsBundle;
|
||||
import com.intellij.cvsSupport2.cvsoperations.cvsAdd.AddedFileInfo;
|
||||
import com.intellij.cvsSupport2.ui.Options;
|
||||
import com.intellij.openapi.project.Project;
|
||||
@@ -35,7 +36,7 @@ public class AddOneFileOptionsDialog extends AbstractAddOptionsDialog{
|
||||
super(project, options);
|
||||
myAddedFileInfo = file;
|
||||
myAddedFileInfo.setIncluded(true);
|
||||
setTitle(com.intellij.CvsBundle.message("dialog.title.add.file.to.cvs", file.getFile().getName()));
|
||||
setTitle(CvsBundle.message("dialog.title.add.file.to.cvs", file.getFile().getName()));
|
||||
init();
|
||||
}
|
||||
|
||||
|
||||
+3
-2
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.intellij.cvsSupport2.cvsoperations.cvsEdit.ui;
|
||||
|
||||
import com.intellij.CvsBundle;
|
||||
import com.intellij.cvsSupport2.CvsVcs2;
|
||||
import com.intellij.cvsSupport2.config.CvsConfiguration;
|
||||
import com.intellij.openapi.project.Project;
|
||||
@@ -29,13 +30,13 @@ import java.awt.*;
|
||||
public class EditOptionsDialog extends OptionsDialog {
|
||||
|
||||
private final JPanel myPanel = new JPanel(new BorderLayout());
|
||||
private final JCheckBox myReservedEdit = new JCheckBox(com.intellij.CvsBundle.message("checkbox.text.reserved.edit"));
|
||||
private final JCheckBox myReservedEdit = new JCheckBox(CvsBundle.message("checkbox.text.reserved.edit"));
|
||||
|
||||
public EditOptionsDialog(Project project) {
|
||||
super(project);
|
||||
myPanel.add(myReservedEdit, BorderLayout.NORTH);
|
||||
myReservedEdit.setSelected(CvsConfiguration.getInstance(project).RESERVED_EDIT);
|
||||
setTitle(com.intellij.CvsBundle.message("dialog.title.edit.options"));
|
||||
setTitle(CvsBundle.message("dialog.title.edit.options"));
|
||||
init();
|
||||
}
|
||||
|
||||
|
||||
+11
-9
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.intellij.cvsSupport2.cvsoperations.cvsUpdate.ui;
|
||||
|
||||
import com.intellij.CvsBundle;
|
||||
import com.intellij.cvsSupport2.Options;
|
||||
import com.intellij.cvsSupport2.config.CvsConfiguration;
|
||||
import com.intellij.cvsSupport2.cvsoperations.cvsUpdate.MergedWithConflictProjectOrModuleFile;
|
||||
@@ -35,6 +36,7 @@ import java.awt.event.ActionEvent;
|
||||
import java.io.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
public class CorruptedProjectFilesDialog extends DialogWrapper {
|
||||
|
||||
@@ -42,7 +44,7 @@ public class CorruptedProjectFilesDialog extends DialogWrapper {
|
||||
|
||||
private JLabel myMessageLabel;
|
||||
private JLabel myIconLabel;
|
||||
private final java.util.List<MergedWithConflictProjectOrModuleFile> myCorruptedFiles;
|
||||
private final List<MergedWithConflictProjectOrModuleFile> myCorruptedFiles;
|
||||
private final Project myProject;
|
||||
private JPanel myPanel;
|
||||
private JRadioButton myGetAllOption;
|
||||
@@ -65,7 +67,7 @@ public class CorruptedProjectFilesDialog extends DialogWrapper {
|
||||
|
||||
myShowDialogOption.setSelected(true);
|
||||
|
||||
setTitle(com.intellij.CvsBundle.message("operation.name.update"));
|
||||
setTitle(CvsBundle.message("operation.name.update"));
|
||||
init();
|
||||
showNextFileInfo();
|
||||
}
|
||||
@@ -86,10 +88,10 @@ public class CorruptedProjectFilesDialog extends DialogWrapper {
|
||||
VirtualFile currentVirtualFile = getCurrentVirtualFile();
|
||||
FileType fileType = currentVirtualFile.getFileType();
|
||||
myMessageLabel.setText(
|
||||
com.intellij.CvsBundle.message("label.project.files.cannot.be.merged.without.conflict",
|
||||
CvsBundle.message("label.project.files.cannot.be.merged.without.conflict",
|
||||
|
||||
fileType.getDescription(), currentVirtualFile.getPresentableUrl()));
|
||||
setTitle(com.intellij.CvsBundle.message("dialog.title.file.cannot.be.merged.without.conflicts", fileType.getDescription(), currentVirtualFile.getName()));
|
||||
setTitle(CvsBundle.message("dialog.title.file.cannot.be.merged.without.conflicts", fileType.getDescription(), currentVirtualFile.getName()));
|
||||
}
|
||||
|
||||
private void onCurrentFileProcessed(boolean isOk) {
|
||||
@@ -118,7 +120,7 @@ public class CorruptedProjectFilesDialog extends DialogWrapper {
|
||||
|
||||
private class SkipFile extends AbstractAction {
|
||||
SkipFile() {
|
||||
putValue(NAME, com.intellij.CvsBundle.message("button.text.skip"));
|
||||
putValue(NAME, CvsBundle.message("button.text.skip"));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -129,7 +131,7 @@ public class CorruptedProjectFilesDialog extends DialogWrapper {
|
||||
|
||||
private class GetFile extends AbstractAction {
|
||||
GetFile() {
|
||||
putValue(NAME, com.intellij.CvsBundle.message("button.text.get"));
|
||||
putValue(NAME, CvsBundle.message("button.text.get"));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -141,7 +143,7 @@ public class CorruptedProjectFilesDialog extends DialogWrapper {
|
||||
|
||||
private class SkipAll extends AbstractAction {
|
||||
SkipAll() {
|
||||
putValue(NAME, com.intellij.CvsBundle.message("button.text.skip.all"));
|
||||
putValue(NAME, CvsBundle.message("button.text.skip.all"));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -153,7 +155,7 @@ public class CorruptedProjectFilesDialog extends DialogWrapper {
|
||||
|
||||
private class GetAll extends AbstractAction {
|
||||
GetAll() {
|
||||
putValue(NAME, com.intellij.CvsBundle.message("button.text.get.all"));
|
||||
putValue(NAME, CvsBundle.message("button.text.get.all"));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -192,7 +194,7 @@ public class CorruptedProjectFilesDialog extends DialogWrapper {
|
||||
}
|
||||
*/
|
||||
|
||||
private void saveExternally(VirtualFile currentVirtualFile, Document document) {
|
||||
private static void saveExternally(VirtualFile currentVirtualFile, Document document) {
|
||||
FileDocumentManager fileDocumentManager = FileDocumentManager.getInstance();
|
||||
fileDocumentManager.saveDocument(fileDocumentManager.getDocument(currentVirtualFile));
|
||||
File ioProjectFile = VfsUtil.virtualToIoFile(currentVirtualFile);
|
||||
|
||||
+3
-2
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.intellij.cvsSupport2.cvsoperations.cvsWatch.ui;
|
||||
|
||||
import com.intellij.CvsBundle;
|
||||
import com.intellij.openapi.ui.DialogWrapper;
|
||||
import org.netbeans.lib.cvsclient.command.Watch;
|
||||
|
||||
@@ -25,7 +26,7 @@ import javax.swing.*;
|
||||
*/
|
||||
public class WatcherDialog extends DialogWrapper{
|
||||
private JPanel myPanel;
|
||||
private JComboBox myWatchingActions;
|
||||
private JComboBox<Watch> myWatchingActions;
|
||||
public WatcherDialog(Watch defaultWatch, String title) {
|
||||
super(true);
|
||||
|
||||
@@ -36,7 +37,7 @@ public class WatcherDialog extends DialogWrapper{
|
||||
|
||||
myWatchingActions.setSelectedItem(defaultWatch);
|
||||
|
||||
setTitle(com.intellij.CvsBundle.message("dialog.title.watchers.or.editors.settings", title));
|
||||
setTitle(CvsBundle.message("dialog.title.watchers.or.editors.settings", title));
|
||||
|
||||
init();
|
||||
}
|
||||
|
||||
+3
-1
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.intellij.cvsSupport2.cvsoperations.javacvsSpecificImpls;
|
||||
|
||||
import com.intellij.CvsBundle;
|
||||
import com.intellij.cvsSupport2.CvsUtil;
|
||||
import com.intellij.cvsSupport2.cvsoperations.common.RepositoryPathProvider;
|
||||
import com.intellij.cvsSupport2.errorHandling.InvalidModuleDescriptionException;
|
||||
@@ -90,7 +91,8 @@ public class AdminWriterStoringRepositoryPath implements IAdminWriter, Repositor
|
||||
|
||||
@Override
|
||||
public String getRepositoryPath(String repository) {
|
||||
if (myRepositoryPath == null) throw new InvalidModuleDescriptionException(com.intellij.CvsBundle.message("error.mesage.cannot.expand.module", myModuleName), myCvsRoot);
|
||||
if (myRepositoryPath == null) throw new InvalidModuleDescriptionException(
|
||||
CvsBundle.message("error.mesage.cannot.expand.module", myModuleName), myCvsRoot);
|
||||
return myRepositoryPath;
|
||||
}
|
||||
|
||||
|
||||
+3
-1
@@ -15,6 +15,8 @@
|
||||
*/
|
||||
package com.intellij.cvsSupport2.errorHandling;
|
||||
|
||||
import com.intellij.CvsBundle;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
/**
|
||||
@@ -23,6 +25,6 @@ import java.io.File;
|
||||
|
||||
public class CannotFindCvsRootException extends Exception{
|
||||
public CannotFindCvsRootException(File file) {
|
||||
super(com.intellij.CvsBundle.message("exception.text.cannot.find.cvsroot.for.file", file));
|
||||
super(CvsBundle.message("exception.text.cannot.find.cvsroot.for.file", file));
|
||||
}
|
||||
}
|
||||
|
||||
+2
-1
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.intellij.cvsSupport2.ui;
|
||||
|
||||
import com.intellij.CvsBundle;
|
||||
import com.intellij.icons.AllIcons;
|
||||
import com.intellij.ide.actions.ContextHelpAction;
|
||||
import com.intellij.openapi.actionSystem.*;
|
||||
@@ -85,7 +86,7 @@ public class CvsTabbedWindowComponent extends JPanel implements DataProvider, Cv
|
||||
|
||||
private class CloseAction extends AnAction implements DumbAware {
|
||||
CloseAction() {
|
||||
super(com.intellij.CvsBundle.message("close.tab.action.name"), "", AllIcons.Actions.Cancel);
|
||||
super(CvsBundle.message("close.tab.action.name"), "", AllIcons.Actions.Cancel);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+3
-2
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.intellij.cvsSupport2.ui;
|
||||
|
||||
import com.intellij.CvsBundle;
|
||||
import com.intellij.cvsSupport2.config.CvsApplicationLevelConfiguration;
|
||||
import com.intellij.openapi.ui.Messages;
|
||||
import com.intellij.util.ui.OptionsDialog;
|
||||
@@ -32,7 +33,7 @@ public class RestoreDirectoriesConfirmationDialog extends OptionsDialog{
|
||||
|
||||
public RestoreDirectoriesConfirmationDialog() {
|
||||
super(null);
|
||||
setTitle(com.intellij.CvsBundle.message("dialog.title.restore.directories.information"));
|
||||
setTitle(CvsBundle.message("dialog.title.restore.directories.information"));
|
||||
init();
|
||||
}
|
||||
|
||||
@@ -57,7 +58,7 @@ public class RestoreDirectoriesConfirmationDialog extends OptionsDialog{
|
||||
@Override
|
||||
protected Action @NotNull [] createActions() {
|
||||
Action okAction = getOKAction();
|
||||
UIUtil.setActionNameAndMnemonic(com.intellij.CvsBundle.message("button.text.close"), okAction);
|
||||
UIUtil.setActionNameAndMnemonic(CvsBundle.message("button.text.close"), okAction);
|
||||
return new Action[]{okAction};
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ public class GenerateToStringWorker {
|
||||
/**
|
||||
* Creates the {@code toString} method.
|
||||
*
|
||||
* @param selectedMembers the selected members as both {@link com.intellij.psi.PsiField} and {@link com.intellij.psi.PsiMethod}.
|
||||
* @param selectedMembers the selected members as both {@link PsiField} and {@link PsiMethod}.
|
||||
* @param policy conflict resolution policy
|
||||
* @param params additional parameters stored with key/value in the map.
|
||||
* @param template the template to use
|
||||
|
||||
@@ -60,7 +60,7 @@ public class ElementUtils {
|
||||
/**
|
||||
* Gets the list of members to be put in the VelocityContext.
|
||||
*
|
||||
* @param members a list of {@link com.intellij.psi.PsiMember} objects.
|
||||
* @param members a list of {@link PsiMember} objects.
|
||||
* @return a filtered list of only the methods as a {@link MethodElement} objects.
|
||||
*/
|
||||
public static List<MethodElement> getOnlyAsMethodElements(Collection<? extends PsiMember> members) {
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ public abstract class TemplatesManager implements PersistentStateComponent<Templ
|
||||
*
|
||||
* @param resource the resource name. Will lookup using the classpath.
|
||||
* @return the content if the resource
|
||||
* @throws java.io.IOException error reading the file.
|
||||
* @throws IOException error reading the file.
|
||||
*/
|
||||
protected static String readFile(String resource, Class<? extends TemplatesManager> templatesManagerClass) throws IOException {
|
||||
BufferedInputStream in = new BufferedInputStream(templatesManagerClass.getResourceAsStream(resource));
|
||||
|
||||
@@ -17,7 +17,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
*
|
||||
* <p>It contains information about the branch name and the hash it points to.
|
||||
* Note that the object (including the hash) is immutable. That means that if branch reference move along, you have to get new instance
|
||||
* of the GitBranch object, probably from {@link GitRepository#getBranches()} or {@link git4idea.repo.GitRepository#getCurrentBranch()}.
|
||||
* of the GitBranch object, probably from {@link GitRepository#getBranches()} or {@link GitRepository#getCurrentBranch()}.
|
||||
* </p>
|
||||
*
|
||||
* <p>GitBranches are equal, if their full names are equal. That means that if two GitBranch objects have different hashes, they
|
||||
|
||||
@@ -98,7 +98,7 @@ public class GitBranchUtil {
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert {@link git4idea.GitRemoteBranch GitRemoteBranches} to their names, and remove remote HEAD pointers: origin/HEAD.
|
||||
* Convert {@link GitRemoteBranch GitRemoteBranches} to their names, and remove remote HEAD pointers: origin/HEAD.
|
||||
*/
|
||||
@NotNull
|
||||
public static Collection<String> getBranchNamesWithoutRemoteHead(@NotNull Collection<? extends GitRemoteBranch> remoteBranches) {
|
||||
|
||||
@@ -535,7 +535,7 @@ public class GitChangeUtils {
|
||||
|
||||
@NotNull
|
||||
public FilePath getFilePath() {
|
||||
com.intellij.openapi.vcs.@Nullable FilePath t = afterPath != null ? afterPath : beforePath;
|
||||
@Nullable FilePath t = afterPath != null ? afterPath : beforePath;
|
||||
return Objects.requireNonNull(t);
|
||||
}
|
||||
|
||||
|
||||
@@ -241,7 +241,7 @@ public class GitTask {
|
||||
}
|
||||
|
||||
/**
|
||||
* We're using this interface here to work with Task, because standard {@link Task#run(com.intellij.openapi.progress.ProgressIndicator)}
|
||||
* We're using this interface here to work with Task, because standard {@link Task#run(ProgressIndicator)}
|
||||
* is busy with timers.
|
||||
*/
|
||||
private interface TaskExecution {
|
||||
@@ -333,13 +333,11 @@ public class GitTask {
|
||||
private ProgressIndicator myIndicator;
|
||||
private final TaskExecution myTask;
|
||||
private ScheduledFuture<?> myTimer;
|
||||
private final Project myProject;
|
||||
|
||||
GitTaskDelegate(Project project, GitHandler handler, TaskExecution task) {
|
||||
myProject = project;
|
||||
myHandler = handler;
|
||||
myTask = task;
|
||||
Disposer.register(myProject, this);
|
||||
Disposer.register(project, this);
|
||||
}
|
||||
|
||||
public void run(ProgressIndicator indicator) {
|
||||
|
||||
@@ -1,16 +1,6 @@
|
||||
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package git4idea.history;
|
||||
|
||||
import static git4idea.history.GitLogParser.GitLogOption.AUTHOR_NAME;
|
||||
import static git4idea.history.GitLogParser.GitLogOption.AUTHOR_TIME;
|
||||
import static git4idea.history.GitLogParser.GitLogOption.BODY;
|
||||
import static git4idea.history.GitLogParser.GitLogOption.COMMITTER_NAME;
|
||||
import static git4idea.history.GitLogParser.GitLogOption.COMMIT_TIME;
|
||||
import static git4idea.history.GitLogParser.GitLogOption.HASH;
|
||||
import static git4idea.history.GitLogParser.GitLogOption.PARENTS;
|
||||
import static git4idea.history.GitLogParser.GitLogOption.RAW_BODY;
|
||||
import static git4idea.history.GitLogParser.GitLogOption.SUBJECT;
|
||||
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.Pair;
|
||||
@@ -30,11 +20,7 @@ import com.intellij.vcs.log.TimedVcsCommit;
|
||||
import com.intellij.vcs.log.VcsCommitMetadata;
|
||||
import com.intellij.vcs.log.VcsLogObjectsFactory;
|
||||
import com.intellij.vcsUtil.VcsUtil;
|
||||
import git4idea.GitBranch;
|
||||
import git4idea.GitCommit;
|
||||
import git4idea.GitRevisionNumber;
|
||||
import git4idea.GitUtil;
|
||||
import git4idea.GitVcs;
|
||||
import git4idea.*;
|
||||
import git4idea.commands.Git;
|
||||
import git4idea.commands.GitCommand;
|
||||
import git4idea.commands.GitCommandResult;
|
||||
@@ -42,16 +28,13 @@ import git4idea.commands.GitLineHandler;
|
||||
import git4idea.history.browser.SHAHash;
|
||||
import git4idea.repo.GitBranchTrackInfo;
|
||||
import git4idea.repo.GitRepository;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import static git4idea.history.GitLogParser.GitLogOption.*;
|
||||
|
||||
/**
|
||||
* A collection of methods for retrieving history information from native Git.
|
||||
*/
|
||||
@@ -173,10 +156,9 @@ public class GitHistoryUtils {
|
||||
* Create a proper list of parameters for `git log` command from a list of hashes.
|
||||
*
|
||||
* @param vcs an instance of {@link GitVcs} class for the repository, could be obtained from the
|
||||
* corresponding {@link git4idea.repo.GitRepository} or from a project by calling {@code GitVcs.getInstance(project)}
|
||||
* corresponding {@link GitRepository} or from a project by calling {@code GitVcs.getInstance(project)}
|
||||
* @param hashes a list of hashes to call `git log` for
|
||||
* @return a list of parameters that could be fed to a `git log` command
|
||||
* @throws VcsException if there is a problem with running git
|
||||
*/
|
||||
public static String @NotNull [] formHashParameters(@NotNull GitVcs vcs, @NotNull Collection<String> hashes) {
|
||||
List<String> parameters = new ArrayList<>();
|
||||
|
||||
@@ -19,7 +19,7 @@ import static git4idea.history.GitLogParser.GitLogOption.*;
|
||||
* The access methods try heavily to return some default value if real is unavailable, for example, blank string is better than null.
|
||||
* BUT if one tries to get an option which was not specified to the GitLogParser, one will get null.
|
||||
*
|
||||
* @see git4idea.history.GitLogParser
|
||||
* @see GitLogParser
|
||||
*/
|
||||
class GitLogRecord {
|
||||
private static final Logger LOG = Logger.getInstance(GitLogRecord.class);
|
||||
@@ -175,7 +175,7 @@ class GitLogRecord {
|
||||
}
|
||||
|
||||
/**
|
||||
* for debugging purposes - see {@link GitUtil#parseTimestampWithNFEReport(String, git4idea.commands.GitHandler, String)}.
|
||||
* for debugging purposes - see {@link GitUtil#parseTimestampWithNFEReport(String, GitHandler, String)}.
|
||||
*/
|
||||
public void setUsedHandler(GitHandler handler) {
|
||||
myHandler = handler;
|
||||
|
||||
@@ -32,7 +32,7 @@ import java.util.List;
|
||||
* Includes information about the number of pushed commits (or -1 if undefined),
|
||||
* and tells whether the repository was updated after the push was rejected.
|
||||
*
|
||||
* @see git4idea.push.GitPushNativeResult
|
||||
* @see GitPushNativeResult
|
||||
*/
|
||||
public class GitPushRepoResult {
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ import git4idea.commands.GitLineHandlerListener;
|
||||
* discarded while merging. In that case 'git rebase --skip' is used.
|
||||
* </p>
|
||||
* <p>
|
||||
* To use the detector add it as a {@link git4idea.commands.GitLineHandlerListener} to {@link git4idea.commands.GitLineHandler}
|
||||
* To use the detector add it as a {@link GitLineHandlerListener} to {@link git4idea.commands.GitLineHandler}
|
||||
* </p>
|
||||
*/
|
||||
public class GitRebaseProblemDetector implements GitLineHandlerListener {
|
||||
|
||||
@@ -20,7 +20,7 @@ import java.util.Collection;
|
||||
* All get-methods (like {@link #getCurrentRevision()}) are just getters of the correspondent fields and thus are very fast.
|
||||
* </p>
|
||||
* <p>
|
||||
* The GitRepository is updated "externally" by the {@link git4idea.repo.GitRepositoryUpdater}, when correspondent {@code .git/} service files
|
||||
* The GitRepository is updated "externally" by the {@link GitRepositoryUpdater}, when correspondent {@code .git/} service files
|
||||
* change.
|
||||
* </p>
|
||||
* <p>
|
||||
|
||||
@@ -30,7 +30,7 @@ import java.util.*;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Collects changes from the Git repository in the given {@link com.intellij.openapi.vcs.changes.VcsDirtyScope}
|
||||
* Collects changes from the Git repository in the given {@link VcsDirtyScope}
|
||||
* by calling {@code 'git status --porcelain -z'} on it.
|
||||
* Works only on Git 1.7.0 and later.
|
||||
* </p>
|
||||
|
||||
@@ -17,6 +17,7 @@ package org.jetbrains.plugins.gradle.service.resolve.dsl;
|
||||
|
||||
import com.intellij.lang.annotation.AnnotationHolder;
|
||||
import com.intellij.lang.annotation.Annotator;
|
||||
import com.intellij.lang.annotation.HighlightSeverity;
|
||||
import com.intellij.psi.JavaPsiFacade;
|
||||
import com.intellij.psi.PsiClass;
|
||||
import com.intellij.psi.PsiElement;
|
||||
@@ -61,7 +62,7 @@ public class GradleDslAnnotator implements Annotator {
|
||||
|
||||
PsiElement nameElement = referenceExpression.getReferenceNameElement();
|
||||
if (nameElement != null) {
|
||||
holder.newSilentAnnotation(com.intellij.lang.annotation.HighlightSeverity.INFORMATION).range(nameElement).textAttributes(MAP_KEY).create();
|
||||
holder.newSilentAnnotation(HighlightSeverity.INFORMATION).range(nameElement).textAttributes(MAP_KEY).create();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+4
-5
@@ -119,7 +119,7 @@ public interface GradleProjectResolverExtension extends ParametersEnhancer {
|
||||
/**
|
||||
* Allows to request gradle tooling models after "sync" tasks are run
|
||||
*
|
||||
* @see BuildActionExecuter.Builder#buildFinished(org.gradle.tooling.BuildAction, org.gradle.tooling.IntermediateResultHandler)
|
||||
* @see BuildActionExecuter.Builder#buildFinished(org.gradle.tooling.BuildAction, IntermediateResultHandler)
|
||||
*/
|
||||
@Nullable
|
||||
default ProjectImportModelProvider getModelProvider() {return null;}
|
||||
@@ -128,15 +128,15 @@ public interface GradleProjectResolverExtension extends ParametersEnhancer {
|
||||
* Allows to request gradle tooling models after gradle projects are loaded and before "sync" tasks are run.
|
||||
* This can be used to setup "sync" tasks for the import
|
||||
*
|
||||
* @see BuildActionExecuter.Builder#projectsLoaded(org.gradle.tooling.BuildAction, org.gradle.tooling.IntermediateResultHandler)
|
||||
* @see BuildActionExecuter.Builder#projectsLoaded(org.gradle.tooling.BuildAction, IntermediateResultHandler)
|
||||
*/
|
||||
@Nullable
|
||||
default ProjectImportModelProvider getProjectsLoadedModelProvider() {return null;}
|
||||
|
||||
/**
|
||||
* @return whether or not this resolver requires Gradle task running infrastructure to be initialized, if any of the resolvers which are
|
||||
* used by the resolution return true then the {@link org.gradle.tooling.BuildActionExecuter} will have
|
||||
* {@link org.gradle.tooling.BuildActionExecuter#forTasks(String...)} called with an empty list. This will allow
|
||||
* used by the resolution return true then the {@link BuildActionExecuter} will have
|
||||
* {@link BuildActionExecuter#forTasks(String...)} called with an empty list. This will allow
|
||||
* any tasks that are scheduled by Gradle plugin in the model builders to be run.
|
||||
*
|
||||
* @deprecated not required anymore
|
||||
@@ -225,7 +225,6 @@ public interface GradleProjectResolverExtension extends ParametersEnhancer {
|
||||
/**
|
||||
* Allows extension to contribute to init script
|
||||
* @param taskNames gradle task names to be executed
|
||||
* @param jvmParametersSetup jvm configuration that will be applied to Gradle jvm
|
||||
* @param initScriptConsumer consumer of init script text. Must be called to add script txt
|
||||
* @param parameters storage for passing optional named parameters
|
||||
*/
|
||||
|
||||
+5
-4
@@ -14,6 +14,7 @@ import com.intellij.openapi.module.Module;
|
||||
import com.intellij.openapi.module.ModuleType;
|
||||
import com.intellij.openapi.module.ModuleTypeManager;
|
||||
import com.intellij.openapi.roots.DependencyScope;
|
||||
import com.intellij.openapi.util.Key;
|
||||
import com.intellij.openapi.util.Pair;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
@@ -360,10 +361,10 @@ public final class GradleProjectResolverUtil {
|
||||
attachSourcesAndJavadocFromGradleCacheIfNeeded(null, gradleUserHomeDir, libraryData);
|
||||
}
|
||||
|
||||
private static final com.intellij.openapi.util.Key<Set<LibraryData>> LIBRARIES_CACHE =
|
||||
com.intellij.openapi.util.Key.create("GradleProjectResolverUtil.LIBRARIES_CACHE");
|
||||
private static final com.intellij.openapi.util.Key<Map<String, Map<LibraryPathType, List<String>>>> PATHS_CACHE =
|
||||
com.intellij.openapi.util.Key.create("GradleProjectResolverUtil.PATHS_CACHE");
|
||||
private static final Key<Set<LibraryData>> LIBRARIES_CACHE =
|
||||
Key.create("GradleProjectResolverUtil.LIBRARIES_CACHE");
|
||||
private static final Key<Map<String, Map<LibraryPathType, List<String>>>> PATHS_CACHE =
|
||||
Key.create("GradleProjectResolverUtil.PATHS_CACHE");
|
||||
|
||||
public static void attachSourcesAndJavadocFromGradleCacheIfNeeded(ProjectResolverContext context,
|
||||
File gradleUserHomeDir,
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ import com.intellij.openapi.extensions.ExtensionPointName;
|
||||
|
||||
/**
|
||||
* Container of methods, which will be available on a top-level of closures,
|
||||
* passed to GroovyDSL contributors. See {@link org.jetbrains.plugins.groovy.dsl.dsltop.GroovyDslDefaultMembers} for an example.
|
||||
* passed to GroovyDSL contributors. See {@link GroovyDslDefaultMembers} for an example.
|
||||
* All methods to inject should take one extra parameter - an instance of {@link org.jetbrains.plugins.groovy.dsl.GdslMembersHolderConsumer}
|
||||
* to be refer its properties.
|
||||
*
|
||||
|
||||
+3
-3
@@ -17,9 +17,9 @@ package org.jetbrains.plugins.groovy.lang.psi.api.util;
|
||||
|
||||
import com.intellij.util.IncorrectOperationException;
|
||||
import org.jetbrains.plugins.groovy.lang.psi.GroovyPsiElement;
|
||||
import org.jetbrains.plugins.groovy.lang.psi.api.statements.GrStatement;
|
||||
import org.jetbrains.plugins.groovy.lang.psi.api.statements.GrVariable;
|
||||
import org.jetbrains.plugins.groovy.lang.psi.api.statements.GrVariableDeclaration;
|
||||
import org.jetbrains.plugins.groovy.lang.psi.api.statements.GrStatement;
|
||||
|
||||
/**
|
||||
* @author ilyas
|
||||
@@ -30,7 +30,7 @@ public interface GrVariableDeclarationOwner extends GroovyPsiElement {
|
||||
* Removes variable from its declaration. In case of alone variablein declaration,
|
||||
* it also will be removed.
|
||||
* @param variable to remove
|
||||
* @throws com.intellij.util.IncorrectOperationException in case the operation cannot be performed
|
||||
* @throws IncorrectOperationException in case the operation cannot be performed
|
||||
*/
|
||||
void removeVariable(GrVariable variable);
|
||||
|
||||
@@ -39,7 +39,7 @@ public interface GrVariableDeclarationOwner extends GroovyPsiElement {
|
||||
* @param declaration declaration to insert
|
||||
* @param anchor Anchor after which new variabler declaration will be placed
|
||||
* @return inserted variable declaration
|
||||
* @throws com.intellij.util.IncorrectOperationException in case the operation cannot be performed
|
||||
* @throws IncorrectOperationException in case the operation cannot be performed
|
||||
*/
|
||||
GrVariableDeclaration addVariableDeclarationBefore(GrVariableDeclaration declaration, GrStatement anchor) throws IncorrectOperationException;
|
||||
|
||||
|
||||
+1
-1
@@ -546,7 +546,7 @@ public class GrClassImplUtil {
|
||||
signatures.add(signature, method);
|
||||
}
|
||||
|
||||
Set<MethodSignature> result = new java.util.HashSet<>();
|
||||
Set<MethodSignature> result = new HashSet<>();
|
||||
for (MethodSignature signature : signatures.keySet()) {
|
||||
if (signatures.valuesForKey(signature) > 1) {
|
||||
result.add(signature);
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ public interface ContextSpecificInsertHandler {
|
||||
boolean isAcceptable(InsertionContext context, int startOffset, LookupElement item);
|
||||
|
||||
/**
|
||||
* Handler can be executed ONLY if {@link #isAcceptable(com.intellij.codeInsight.completion.InsertionContext, int, com.intellij.codeInsight.lookup.LookupElement)}
|
||||
* Handler can be executed ONLY if {@link #isAcceptable(InsertionContext, int, LookupElement)}
|
||||
* returns true.
|
||||
*/
|
||||
void handleInsert(InsertionContext context, int startOffset, LookupElement item);
|
||||
|
||||
+3
-3
@@ -25,6 +25,7 @@ import com.intellij.psi.search.LocalSearchScope;
|
||||
import com.intellij.psi.search.searches.ReferencesSearch;
|
||||
import com.intellij.util.IncorrectOperationException;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.plugins.groovy.codeStyle.GrReferenceAdjuster;
|
||||
import org.jetbrains.plugins.groovy.intentions.base.Intention;
|
||||
import org.jetbrains.plugins.groovy.intentions.base.PsiElementPredicate;
|
||||
import org.jetbrains.plugins.groovy.lang.psi.GrQualifiedReference;
|
||||
@@ -41,7 +42,7 @@ public class ImportOnDemandIntention extends Intention {
|
||||
@Override
|
||||
protected void processIntention(@NotNull PsiElement element, @NotNull Project project, Editor editor) throws IncorrectOperationException {
|
||||
if (!(element instanceof GrReferenceElement)) return;
|
||||
final GrReferenceElement ref = (GrReferenceElement)element;
|
||||
final GrReferenceElement<?> ref = (GrReferenceElement<?>)element;
|
||||
final PsiElement resolved = ref.resolve();
|
||||
if (!(resolved instanceof PsiClass)) return;
|
||||
|
||||
@@ -56,10 +57,9 @@ public class ImportOnDemandIntention extends Intention {
|
||||
|
||||
for (PsiReference reference : ReferencesSearch.search(resolved, new LocalSearchScope(containingFile))) {
|
||||
final PsiElement refElement = reference.getElement();
|
||||
if (refElement == null) continue;
|
||||
final PsiElement parent = refElement.getParent();
|
||||
if (parent instanceof GrQualifiedReference<?>) {
|
||||
org.jetbrains.plugins.groovy.codeStyle.GrReferenceAdjuster.shortenReference((GrQualifiedReference<?>)parent);
|
||||
GrReferenceAdjuster.shortenReference((GrQualifiedReference<?>)parent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-2
@@ -14,7 +14,6 @@ import com.intellij.psi.search.GlobalSearchScope;
|
||||
import com.intellij.psi.util.InheritanceUtil;
|
||||
import com.intellij.psi.util.PsiTreeUtil;
|
||||
import com.intellij.util.Consumer;
|
||||
import java.util.HashSet;
|
||||
import icons.JetgroovyIcons;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -544,7 +543,7 @@ public class CompleteReferenceExpression {
|
||||
List<GroovyResolveResult> list = new ArrayList<>(results.length);
|
||||
myPropertyNames.removeAll(myPreferredFieldNames);
|
||||
|
||||
Set<String> usedFields = new java.util.HashSet<>();
|
||||
Set<String> usedFields = new HashSet<>();
|
||||
for (GroovyResolveResult result : results) {
|
||||
final PsiElement element = result.getElement();
|
||||
if (element instanceof PsiField) {
|
||||
|
||||
+1
-1
@@ -520,7 +520,7 @@ public abstract class GroovyRefactoringUtil {
|
||||
* while(true) {a=foo()}
|
||||
* @param statement
|
||||
* @return corresponding statement inside block if it has been created or statement itself.
|
||||
* @throws com.intellij.util.IncorrectOperationException
|
||||
* @throws IncorrectOperationException
|
||||
*/
|
||||
|
||||
@NotNull
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ public interface GrIntroduceParameterSettings extends GrIntroduceSettings, Intro
|
||||
TIntArrayList parametersToRemove();
|
||||
|
||||
/**
|
||||
* @see com.intellij.refactoring.IntroduceParameterRefactoring
|
||||
* @see IntroduceParameterRefactoring
|
||||
*/
|
||||
@MagicConstant(valuesFromClass = IntroduceParameterRefactoring.class)
|
||||
int replaceFieldsWithGetters();
|
||||
|
||||
@@ -49,7 +49,7 @@ public class HgWorkingCopyRevisionsCommand {
|
||||
* Current repository revision(s).
|
||||
* @param repo repository to work on.
|
||||
* @return List of parent's revision numbers.
|
||||
* @see #parents(com.intellij.openapi.vfs.VirtualFile, com.intellij.openapi.vfs.VirtualFile, org.zmlx.hg4idea.HgRevisionNumber)
|
||||
* @see #parents(VirtualFile, VirtualFile, HgRevisionNumber)
|
||||
* TODO: return Pair
|
||||
*/
|
||||
@NotNull
|
||||
@@ -58,7 +58,7 @@ public class HgWorkingCopyRevisionsCommand {
|
||||
}
|
||||
|
||||
/**
|
||||
* @see #parents(com.intellij.openapi.vfs.VirtualFile, com.intellij.openapi.vfs.VirtualFile, org.zmlx.hg4idea.HgRevisionNumber)
|
||||
* @see #parents(VirtualFile, VirtualFile, HgRevisionNumber)
|
||||
*/
|
||||
@NotNull
|
||||
public Couple<HgRevisionNumber> parents(@NotNull VirtualFile repo, @Nullable VirtualFile file) {
|
||||
|
||||
+2
-2
@@ -590,8 +590,8 @@ public abstract class Maven3XServerEmbedder extends Maven3ServerEmbedder {
|
||||
container.addComponent(pathTranslator, org.apache.maven.model.path.PathTranslator.class.getName());
|
||||
container.addComponent(pathTranslator, org.apache.maven.model.path.PathTranslator.class, "ide");
|
||||
|
||||
container.addComponent(urlNormalizer, org.apache.maven.model.path.UrlNormalizer.class.getName());
|
||||
container.addComponent(urlNormalizer, org.apache.maven.model.path.UrlNormalizer.class, "ide");
|
||||
container.addComponent(urlNormalizer, UrlNormalizer.class.getName());
|
||||
container.addComponent(urlNormalizer, UrlNormalizer.class, "ide");
|
||||
|
||||
StringSearchModelInterpolator interpolator = new CustomMaven3ModelInterpolator2();
|
||||
interpolator.setPathTranslator(pathTranslator);
|
||||
|
||||
+11
-10
@@ -6,6 +6,7 @@ import com.intellij.openapi.fileChooser.FileChooserDescriptorFactory;
|
||||
import com.intellij.openapi.ui.TextFieldWithBrowseButton;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.ui.InsertPathAction;
|
||||
import com.intellij.util.ArrayUtil;
|
||||
import org.jetbrains.idea.svn.SvnBundle;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -31,7 +32,7 @@ public class ConfigureProxiesOptionsPanel implements RepositoryUrlsListener {
|
||||
private JButton myTestConnectionButton;
|
||||
private JTextField myPathToCertificatesField;
|
||||
private TextFieldWithBrowseButton myClientCertificatePathField;
|
||||
private JList myRepositoriesList;
|
||||
private JList<String> myRepositoriesList;
|
||||
private boolean myIsDefault;
|
||||
|
||||
private final Runnable myValidator;
|
||||
@@ -44,20 +45,20 @@ public class ConfigureProxiesOptionsPanel implements RepositoryUrlsListener {
|
||||
private final TestConnectionPerformer myTestConnectionPerformer;
|
||||
|
||||
/**
|
||||
* called on after repositories list had been recalculated by {@link org.jetbrains.idea.svn.config.PatternsListener}
|
||||
* called on after repositories list had been recalculated by {@link PatternsListener}
|
||||
*
|
||||
* @see org.jetbrains.idea.svn.config.RepositoryUrlsListener#onListChanged(java.util.List)
|
||||
* @see RepositoryUrlsListener#onListChanged(List)
|
||||
*/
|
||||
@Override
|
||||
public void onListChanged(final List<String> urls) {
|
||||
final String value = (String) myRepositoriesList.getSelectedValue();
|
||||
final String value = myRepositoriesList.getSelectedValue();
|
||||
myRepositoriesList.removeAll();
|
||||
myRepositoriesList.setListData(urls.toArray());
|
||||
myRepositoriesList.setListData(ArrayUtil.toStringArray(urls));
|
||||
// for keeping selection
|
||||
if (value != null) {
|
||||
final ListModel model = myRepositoriesList.getModel();
|
||||
final ListModel<String> model = myRepositoriesList.getModel();
|
||||
for (int i = 0; i < model.getSize(); i++) {
|
||||
final String element = (String) model.getElementAt(i);
|
||||
final String element = model.getElementAt(i);
|
||||
if (value.equals(element)) {
|
||||
myRepositoriesList.setSelectedIndex(i);
|
||||
}
|
||||
@@ -68,10 +69,10 @@ public class ConfigureProxiesOptionsPanel implements RepositoryUrlsListener {
|
||||
}
|
||||
|
||||
public List<String> getRepositories() {
|
||||
final ListModel model = myRepositoriesList.getModel();
|
||||
final ListModel<String> model = myRepositoriesList.getModel();
|
||||
final List<String> result = new ArrayList<>(model.getSize());
|
||||
for (int i = 0; i < model.getSize(); i++) {
|
||||
result.add((String) model.getElementAt(i));
|
||||
result.add(model.getElementAt(i));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -98,7 +99,7 @@ public class ConfigureProxiesOptionsPanel implements RepositoryUrlsListener {
|
||||
putPatternsListener();
|
||||
|
||||
myTestConnectionButton.addActionListener(e -> {
|
||||
final String value = (String)myRepositoriesList.getSelectedValue();
|
||||
final String value = myRepositoriesList.getSelectedValue();
|
||||
if ((value != null) && (myTestConnectionPerformer.enabled())) {
|
||||
myTestConnectionPerformer.execute(value);
|
||||
}
|
||||
|
||||
+2
-2
@@ -32,7 +32,7 @@ import java.io.IOException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
/**
|
||||
* This alternative base implementation of {@link com.intellij.tasks.impl.BaseRepository} should be used
|
||||
* This alternative base implementation of {@link BaseRepository} should be used
|
||||
* for new connectors that use httpclient-4.x instead of legacy httpclient-3.1.
|
||||
*
|
||||
* @author Mikhail Golubev
|
||||
@@ -147,7 +147,7 @@ public abstract class NewBaseRepositoryImpl extends BaseRepository {
|
||||
|
||||
private static class PreemptiveBasicAuthInterceptor implements HttpRequestInterceptor {
|
||||
@Override
|
||||
public void process(HttpRequest request, HttpContext context) throws HttpException, IOException {
|
||||
public void process(HttpRequest request, HttpContext context) throws HttpException {
|
||||
final CredentialsProvider provider = (CredentialsProvider)context.getAttribute(HttpClientContext.CREDS_PROVIDER);
|
||||
final Credentials credentials = provider.getCredentials(BASIC_AUTH_SCOPE);
|
||||
if (credentials != null) {
|
||||
|
||||
@@ -29,8 +29,8 @@ import static com.intellij.openapi.editor.HighlighterColors.TEXT;
|
||||
* See https://confluence.jetbrains.com/display/YTD5/Intellisense+for+issue+search for format details.
|
||||
* <p/>
|
||||
* It also provides two additional classes to represent tokens highlighting and
|
||||
* available completion items from response: {@link com.intellij.tasks.youtrack.YouTrackIntellisense.HighlightRange}
|
||||
* and {@link com.intellij.tasks.youtrack.YouTrackIntellisense.CompletionItem}.
|
||||
* available completion items from response: {@link YouTrackIntellisense.HighlightRange}
|
||||
* and {@link YouTrackIntellisense.CompletionItem}.
|
||||
*
|
||||
* @author Mikhail Golubev
|
||||
*/
|
||||
@@ -126,8 +126,8 @@ public class YouTrackIntellisense {
|
||||
|
||||
/**
|
||||
* Main wrapper around "IntelliSense" element in YouTrack response. It delegates further parsing
|
||||
* to {@link com.intellij.tasks.youtrack.YouTrackIntellisense.HighlightRange} and
|
||||
* {@link com.intellij.tasks.youtrack.YouTrackIntellisense.CompletionItem}
|
||||
* to {@link YouTrackIntellisense.HighlightRange} and
|
||||
* {@link YouTrackIntellisense.CompletionItem}
|
||||
*/
|
||||
public static class Response {
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ public class DesignerEditorState implements FileEditorState {
|
||||
}
|
||||
|
||||
/**
|
||||
* @see com.intellij.openapi.fileEditor.FileEditorProvider#readState(org.jdom.Element, com.intellij.openapi.project.Project, com.intellij.openapi.vfs.VirtualFile)
|
||||
* @see com.intellij.openapi.fileEditor.FileEditorProvider#readState(Element, com.intellij.openapi.project.Project, VirtualFile)
|
||||
*/
|
||||
@NotNull
|
||||
public static FileEditorState readState(@Nullable Element sourceElement, @NotNull VirtualFile file, double defaultZoom) {
|
||||
@@ -70,7 +70,7 @@ public class DesignerEditorState implements FileEditorState {
|
||||
}
|
||||
|
||||
/**
|
||||
* @see com.intellij.openapi.fileEditor.FileEditorProvider#writeState(com.intellij.openapi.fileEditor.FileEditorState, com.intellij.openapi.project.Project, org.jdom.Element)
|
||||
* @see com.intellij.openapi.fileEditor.FileEditorProvider#writeState(FileEditorState, com.intellij.openapi.project.Project, Element)
|
||||
*/
|
||||
public static void writeState(@NotNull FileEditorState state, @NotNull Element targetElement) {
|
||||
targetElement.setAttribute(DESIGNER_ZOOM, Double.toString(((DesignerEditorState)state).getZoom()));
|
||||
|
||||
@@ -30,8 +30,8 @@ import org.jetbrains.annotations.Nullable;
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.InputEvent;
|
||||
import java.util.*;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @author Alexander Lobas
|
||||
@@ -185,7 +185,7 @@ public abstract class RadComponent extends PropertiesContainer {
|
||||
* target component's coordinate system. The model coordinate system refers to
|
||||
* the same coordinate system as the bounds returned by {@link #getBounds()}.
|
||||
* <p/>
|
||||
* This means that calling {@link #getBounds(java.awt.Component)} is equivalent
|
||||
* This means that calling {@link #getBounds(Component)} is equivalent
|
||||
* to calling this method and passing in {@link #getBounds()}.
|
||||
* <p/>
|
||||
* Returns a new {@link Rectangle}, so callers are free to modify the result.
|
||||
|
||||
@@ -54,17 +54,17 @@ public interface PaletteItem {
|
||||
String getDeprecatedHint();
|
||||
|
||||
/**
|
||||
* @return the creation data to be used by {@link com.intellij.designer.model.MetaModel#getCreation()}
|
||||
* @return the creation data to be used by {@link MetaModel#getCreation()}
|
||||
*/
|
||||
String getCreation();
|
||||
|
||||
/**
|
||||
* Returns the associated {@link com.intellij.designer.model.MetaModel}, if known
|
||||
* Returns the associated {@link MetaModel}, if known
|
||||
*/
|
||||
MetaModel getMetaModel();
|
||||
|
||||
/**
|
||||
* Sets the associated {@link com.intellij.designer.model.MetaModel}, if known
|
||||
* Sets the associated {@link MetaModel}, if known
|
||||
*/
|
||||
void setMetaModel(MetaModel metaModel);
|
||||
}
|
||||
@@ -57,7 +57,7 @@ public final class ComponentItem implements Cloneable, PaletteItem {
|
||||
private Icon mySmallIcon;
|
||||
/**
|
||||
* @see #getIconPath()
|
||||
* @see #setIconPath(java.lang.String)
|
||||
* @see #setIconPath(String)
|
||||
*/
|
||||
private String myIconPath;
|
||||
/**
|
||||
|
||||
+3
-3
@@ -36,7 +36,7 @@ public abstract class PropertyEditor<V> {
|
||||
/**
|
||||
* @return edited value. Note that {@code null} is the legal.
|
||||
*
|
||||
* @exception java.lang.Exception the method throws exception
|
||||
* @exception Exception the method throws exception
|
||||
* if user enters wrong value and it cannot be applied. Note, that
|
||||
* exception's message will be shown to the user.
|
||||
*/
|
||||
@@ -67,7 +67,7 @@ public abstract class PropertyEditor<V> {
|
||||
|
||||
/**
|
||||
* Property editor can return preferred focused component (if any) inside the component
|
||||
* which is returned by the {@link #getComponent(com.intellij.uiDesigner.radComponents.RadComponent,V,InplaceContext) } method.
|
||||
* which is returned by the {@link #getComponent(RadComponent,V,InplaceContext) } method.
|
||||
* This method is used as a hint to implement better focus handling.
|
||||
* {@code null} values means that editor relies on the UI editor in
|
||||
* determing preferred focused component.
|
||||
@@ -81,7 +81,7 @@ public abstract class PropertyEditor<V> {
|
||||
/**
|
||||
* Editor should update UI of all its internal components to fit current
|
||||
* IDEA Look And Feel. We cannot directly update UI of the component
|
||||
* that is returned by {@link #getComponent(com.intellij.uiDesigner.radComponents.RadComponent,V,InplaceContext) } method
|
||||
* that is returned by {@link #getComponent(RadComponent,V,InplaceContext) } method
|
||||
* because hidden components that are not in the Swing tree can exist.
|
||||
*/
|
||||
public abstract void updateUI();
|
||||
|
||||
@@ -192,9 +192,9 @@ public class RadContainer extends RadComponent implements IContainer {
|
||||
|
||||
/**
|
||||
* @param component component to be added.
|
||||
* @throws java.lang.IllegalArgumentException
|
||||
* @throws IllegalArgumentException
|
||||
* if {@code component} is {@code null}
|
||||
* @throws java.lang.IllegalArgumentException
|
||||
* @throws IllegalArgumentException
|
||||
* if {@code component} already exist in the
|
||||
* container
|
||||
*/
|
||||
@@ -231,10 +231,10 @@ public class RadContainer extends RadComponent implements IContainer {
|
||||
* of invalid Swing hierarchy.
|
||||
*
|
||||
* @param component component to be removed.
|
||||
* @throws java.lang.IllegalArgumentException
|
||||
* @throws IllegalArgumentException
|
||||
* if {@code component}
|
||||
* is {@code null}
|
||||
* @throws java.lang.IllegalArgumentException
|
||||
* @throws IllegalArgumentException
|
||||
* if {@code component}
|
||||
* doesn't exist in the container
|
||||
*/
|
||||
@@ -334,7 +334,7 @@ public class RadContainer extends RadComponent implements IContainer {
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws java.lang.IllegalArgumentException
|
||||
* @throws IllegalArgumentException
|
||||
* if {@code type}
|
||||
* is {@code null}
|
||||
* @see com.intellij.uiDesigner.shared.BorderType
|
||||
|
||||
+2
-1
@@ -18,6 +18,7 @@ package org.intellij.plugins.xpathView.support.jaxen.extensions;
|
||||
import org.intellij.lang.xpath.context.functions.FunctionImpl;
|
||||
import org.intellij.lang.xpath.context.functions.Parameter;
|
||||
import org.intellij.lang.xpath.psi.XPathType;
|
||||
import org.jaxen.Function;
|
||||
|
||||
public abstract class FunctionImplementation extends FunctionImpl {
|
||||
|
||||
@@ -25,5 +26,5 @@ public abstract class FunctionImplementation extends FunctionImpl {
|
||||
super(name, returnType, parameters);
|
||||
}
|
||||
|
||||
public abstract org.jaxen.Function getImplementation();
|
||||
public abstract Function getImplementation();
|
||||
}
|
||||
|
||||
+2
-1
@@ -16,6 +16,7 @@
|
||||
package org.intellij.plugins.xpathView.ui;
|
||||
|
||||
import com.intellij.ide.util.PropertiesComponent;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.ui.DialogWrapper;
|
||||
import com.intellij.openapi.util.DimensionService;
|
||||
import com.intellij.openapi.util.text.StringUtilRt;
|
||||
@@ -31,7 +32,7 @@ public abstract class ModeSwitchableDialog extends DialogWrapper {
|
||||
protected final DimensionService dimensionService = DimensionService.getInstance();
|
||||
private Mode myMode;
|
||||
|
||||
public ModeSwitchableDialog(com.intellij.openapi.project.Project project, boolean canBeParent) {
|
||||
public ModeSwitchableDialog(Project project, boolean canBeParent) {
|
||||
super(project, canBeParent);
|
||||
|
||||
myMode = Mode.values()[StringUtilRt.parseInt(PropertiesComponent.getInstance().getValue(getPrivateDimensionServiceKey() + ".MODE", "0"), 0)];
|
||||
|
||||
+18
-20
@@ -39,8 +39,8 @@ public class LocalDebugger implements Debugger {
|
||||
|
||||
private volatile State myState = State.CREATED;
|
||||
|
||||
private final LinkedList<StyleFrame> myFrames = new LinkedList<StyleFrame>();
|
||||
private final LinkedList<SourceFrame> mySourceFrames = new LinkedList<SourceFrame>();
|
||||
private final LinkedList<StyleFrame> myFrames = new LinkedList<>();
|
||||
private final LinkedList<SourceFrame> mySourceFrames = new LinkedList<>();
|
||||
|
||||
public LocalDebugger(final Transformer transformer, final Source source, final Result result) {
|
||||
prepareTransformer(transformer);
|
||||
@@ -48,24 +48,22 @@ public class LocalDebugger implements Debugger {
|
||||
myBreakpointManager = new BreakpointManagerImpl();
|
||||
myEventQueue = new OutputEventQueueImpl(this);
|
||||
|
||||
myThread = new Thread(new Runnable() {
|
||||
public void run() {
|
||||
try {
|
||||
synchronized (theLock) {
|
||||
myState = State.RUNNING;
|
||||
theLock.notifyAll();
|
||||
}
|
||||
transformer.transform(source, result);
|
||||
stopped();
|
||||
} catch (DebuggerStoppedException e) {
|
||||
// OK
|
||||
} catch (TransformerException e) {
|
||||
// TODO: log, pass to client
|
||||
e.printStackTrace();
|
||||
stopped();
|
||||
myThread = new Thread(() -> {
|
||||
try {
|
||||
synchronized (theLock) {
|
||||
myState = State.RUNNING;
|
||||
theLock.notifyAll();
|
||||
}
|
||||
transformer.transform(source, result);
|
||||
stopped();
|
||||
} catch (DebuggerStoppedException e) {
|
||||
// OK
|
||||
} catch (TransformerException e) {
|
||||
// TODO: log, pass to client
|
||||
e.printStackTrace();
|
||||
stopped();
|
||||
}
|
||||
},"local debugger");
|
||||
}, "local debugger");
|
||||
}
|
||||
|
||||
protected void prepareTransformer(Transformer transformer) {
|
||||
@@ -316,7 +314,7 @@ public class LocalDebugger implements Debugger {
|
||||
// suspendAndWait();
|
||||
}
|
||||
|
||||
((AbstractFrame)myFrames.removeFirst()).invalidate();
|
||||
((AbstractFrame<?>)myFrames.removeFirst()).invalidate();
|
||||
}
|
||||
|
||||
public void step() {
|
||||
@@ -336,7 +334,7 @@ public class LocalDebugger implements Debugger {
|
||||
resume();
|
||||
}
|
||||
|
||||
public org.intellij.plugins.xsltDebugger.rt.engine.Value eval(String expr) throws EvaluationException {
|
||||
public Value eval(String expr) throws EvaluationException {
|
||||
final StyleFrame frame = getCurrentFrame();
|
||||
if (frame == null) {
|
||||
throw new EvaluationException("No frame available");
|
||||
|
||||
@@ -38,7 +38,7 @@ public interface PyDecorator extends PyCallExpression, StubBasedPsiElement<PyDec
|
||||
|
||||
/**
|
||||
* True if the annotating function is a builtin, useful together with getName(). Implementation uses stub info.
|
||||
* @see com.jetbrains.python.psi.PyElement#getName()
|
||||
* @see PyElement#getName()
|
||||
*/
|
||||
boolean isBuiltin();
|
||||
|
||||
|
||||
@@ -18,9 +18,11 @@ package com.jetbrains.python.psi.types;
|
||||
import com.intellij.psi.PsiFile;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* A pack of constraints that limit behavior of {@link com.jetbrains.python.psi.types.TypeEvalContext}.
|
||||
* Any two {@link com.jetbrains.python.psi.types.TypeEvalContext}s may share their cache if their constraints are equal and no PSI changes
|
||||
* A pack of constraints that limit behavior of {@link TypeEvalContext}.
|
||||
* Any two {@link TypeEvalContext}s may share their cache if their constraints are equal and no PSI changes
|
||||
* happened between their creation.
|
||||
* <p/>
|
||||
* This class created to support hash/equals for context.
|
||||
@@ -34,7 +36,7 @@ class TypeEvalConstraints {
|
||||
@Nullable final PsiFile myOrigin;
|
||||
|
||||
/**
|
||||
* @see com.jetbrains.python.psi.types.TypeEvalContext
|
||||
* @see TypeEvalContext
|
||||
*/
|
||||
TypeEvalConstraints(final boolean allowDataFlow, final boolean allowStubToAST, final boolean allowCallContext,
|
||||
@Nullable final PsiFile origin) {
|
||||
@@ -51,12 +53,10 @@ class TypeEvalConstraints {
|
||||
|
||||
TypeEvalConstraints that = (TypeEvalConstraints)o;
|
||||
|
||||
if (myAllowDataFlow != that.myAllowDataFlow) return false;
|
||||
if (myAllowStubToAST != that.myAllowStubToAST) return false;
|
||||
if (myAllowCallContext != that.myAllowCallContext) return false;
|
||||
if (myOrigin != null ? !myOrigin.equals(that.myOrigin) : that.myOrigin != null) return false;
|
||||
|
||||
return true;
|
||||
return myAllowDataFlow == that.myAllowDataFlow &&
|
||||
myAllowStubToAST == that.myAllowStubToAST &&
|
||||
myAllowCallContext == that.myAllowCallContext &&
|
||||
Objects.equals(myOrigin, that.myOrigin);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+2
-2
@@ -21,7 +21,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* TODO: Move methods to {@link com.jetbrains.python.codeInsight.PyCustomMember}. Only dependency hell prevents me from doing it
|
||||
* TODO: Move methods to {@link PyCustomMember}. Only dependency hell prevents me from doing it
|
||||
*/
|
||||
public final class PyCustomMemberUtils {
|
||||
private PyCustomMemberUtils() {
|
||||
@@ -29,7 +29,7 @@ public final class PyCustomMemberUtils {
|
||||
|
||||
/**
|
||||
* Creates {@link com.intellij.codeInsight.lookup.LookupElement} to be used in cases like {@link com.jetbrains.python.psi.types.PyType#getCompletionVariants(String, com.intellij.psi.PsiElement, com.intellij.util.ProcessingContext)}
|
||||
* This method should be in {@link com.jetbrains.python.codeInsight.PyCustomMember} but it does not. We need to move it.
|
||||
* This method should be in {@link PyCustomMember} but it does not. We need to move it.
|
||||
*
|
||||
* @param member custom member
|
||||
* @param typeText type text (if any)
|
||||
|
||||
+3
-3
@@ -54,7 +54,7 @@ public class PyAssignmentToLoopOrWithParameterInspection extends PyInspection {
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds first parent of specific type (See {@link #isRequiredStatement(com.intellij.psi.PsiElement)})
|
||||
* Finds first parent of specific type (See {@link #isRequiredStatement(PsiElement)})
|
||||
* that declares one of names, declared in this statement
|
||||
*/
|
||||
private void checkNotReDeclaringUpperLoopOrStatement(@NotNull final PsiElement statement) {
|
||||
@@ -78,7 +78,7 @@ public class PyAssignmentToLoopOrWithParameterInspection extends PyInspection {
|
||||
*
|
||||
* @param elementToCheck element to check
|
||||
* @param forStatement statement to obtain "else" part from
|
||||
* @return true if declated in "Else" block
|
||||
* @return true if declared in "Else" block
|
||||
*/
|
||||
private static boolean isDeclaredInElse(@NotNull final PsiElement elementToCheck, @NotNull final PyForStatement forStatement) {
|
||||
final PyElsePart elsePart = forStatement.getElsePart();
|
||||
@@ -92,7 +92,7 @@ public class PyAssignmentToLoopOrWithParameterInspection extends PyInspection {
|
||||
|
||||
/**
|
||||
* Filters list of parents trying to find parent that declares var that refers to {@link #myNode}
|
||||
* Returns {@link com.jetbrains.python.codeInsight.controlflow.ScopeOwner} if nothing found.
|
||||
* Returns {@link ScopeOwner} if nothing found.
|
||||
* Returns parent otherwise.
|
||||
*/
|
||||
private static class Filter implements Condition<PsiElement> {
|
||||
|
||||
+1
-1
@@ -108,7 +108,7 @@ public abstract class PyInspectionVisitor extends PyElementVisitor {
|
||||
/**
|
||||
* The most full-blown version.
|
||||
*
|
||||
* @see com.intellij.codeInspection.ProblemDescriptor
|
||||
* @see ProblemDescriptor
|
||||
*/
|
||||
protected final void registerProblem(
|
||||
@NotNull final PsiElement psiElement,
|
||||
|
||||
+2
-2
@@ -23,9 +23,9 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Cache for {@link com.jetbrains.python.psi.impl.blockEvaluator.PyBlockEvaluator}.
|
||||
* Cache for {@link PyBlockEvaluator}.
|
||||
* You may obtain one via {@link PyBlockEvaluator#getContext()} and pass to ctor:
|
||||
* {@link com.jetbrains.python.psi.impl.blockEvaluator.PyBlockEvaluator#PyBlockEvaluator(PyEvaluationContext)} to enable cache
|
||||
* {@link PyBlockEvaluator#PyBlockEvaluator(PyEvaluationContext)} to enable cache
|
||||
*
|
||||
* @author Ilya.Kazakevich
|
||||
*/
|
||||
|
||||
@@ -20,7 +20,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* Creates view and presenter allowing them to have links to each other.
|
||||
* Implement it and pass to {@link com.jetbrains.python.vp.ViewPresenterUtils#linkViewWithPresenterAndLaunch(Class, Class, Creator)}
|
||||
* Implement it and pass to {@link ViewPresenterUtils#linkViewWithPresenterAndLaunch(Class, Class, Creator)}
|
||||
*
|
||||
* @author Ilya.Kazakevich
|
||||
* @param <V> view interface
|
||||
|
||||
@@ -27,7 +27,7 @@ import java.lang.reflect.Method;
|
||||
*/
|
||||
class PresenterHandler<C> implements InvocationHandler {
|
||||
/**
|
||||
* Presenter, created by user with {@link com.jetbrains.python.vp.Creator#createPresenter(Object)}
|
||||
* Presenter, created by user with {@link Creator#createPresenter(Object)}
|
||||
*/
|
||||
private C realPresenter;
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ import java.lang.reflect.Method;
|
||||
*/
|
||||
class ViewHandler<C> implements InvocationHandler {
|
||||
/**
|
||||
* Real view, created by user using {@link com.jetbrains.python.vp.Creator#createView(Presenter)}
|
||||
* Real view, created by user using {@link Creator#createView(Presenter)}
|
||||
*/
|
||||
private C realView;
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ public abstract class RestInspectionVisitor extends RestElementVisitor {
|
||||
|
||||
/**
|
||||
* The most full-blown version.
|
||||
* @see com.intellij.codeInspection.ProblemDescriptor
|
||||
* @see ProblemDescriptor
|
||||
*/
|
||||
protected final void registerProblem(
|
||||
@NotNull final PsiElement psiElement,
|
||||
@@ -78,7 +78,7 @@ public abstract class RestInspectionVisitor extends RestElementVisitor {
|
||||
|
||||
/**
|
||||
* The most full-blown version.
|
||||
* @see com.intellij.codeInspection.ProblemDescriptor
|
||||
* @see ProblemDescriptor
|
||||
*/
|
||||
protected final void registerProblem(
|
||||
@NotNull final PsiElement psiElement,
|
||||
|
||||
@@ -55,7 +55,7 @@ public final class KnownArgumentsInfo implements ArgumentsInfo {
|
||||
private final int myMinArguments;
|
||||
/**
|
||||
* Maximum number of arguments this command accepts
|
||||
* (number of required arguments + num of optional arguments or {@link java.lang.Integer#MAX_VALUE} if last argument may have infinite
|
||||
* (number of required arguments + num of optional arguments or {@link Integer#MAX_VALUE} if last argument may have infinite
|
||||
* number of values)
|
||||
*/
|
||||
private final int myMaxArguments;
|
||||
|
||||
@@ -55,7 +55,7 @@ public class PyAttachToProcessDebugRunner extends PyDebugRunner {
|
||||
return XDebuggerManager.getInstance(myProject).
|
||||
startSessionAndShowTab(String.valueOf(myPid), null, new XDebugProcessStarter() {
|
||||
@Override
|
||||
@org.jetbrains.annotations.NotNull
|
||||
@NotNull
|
||||
public XDebugProcess start(@NotNull final XDebugSession session) {
|
||||
PyRemoteDebugProcess pyDebugProcess =
|
||||
new PyRemoteDebugProcess(session, serverSocket, result.getExecutionConsole(),
|
||||
|
||||
@@ -14,7 +14,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* Supports renaming for magic literals.
|
||||
* <strong>Install it</strong> as {@link com.intellij.refactoring.rename.RenamePsiElementProcessor#EP_NAME}
|
||||
* <strong>Install it</strong> as {@link RenamePsiElementProcessor#EP_NAME}
|
||||
* @author Ilya.Kazakevich
|
||||
*/
|
||||
class PyMagicLiteralRenameProcessor extends RenamePsiElementProcessor {
|
||||
|
||||
+10
-10
@@ -20,7 +20,7 @@ import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* Moves members between classes via its plugins (managers).
|
||||
* To move members use {@link #getAllMembersCouldBeMoved(com.jetbrains.python.psi.PyClass)} and {@link #moveAllMembers(java.util.Collection, com.jetbrains.python.psi.PyClass, com.jetbrains.python.psi.PyClass...)}
|
||||
* To move members use {@link #getAllMembersCouldBeMoved(PyClass)} and {@link #moveAllMembers(Collection, PyClass, PyClass...)}
|
||||
* To add new manager, extend this class and add it to {@link #MANAGERS}
|
||||
*
|
||||
* @author Ilya.Kazakevich
|
||||
@@ -61,11 +61,11 @@ public abstract class MembersManager<T extends PyElement> implements Function<T,
|
||||
|
||||
|
||||
/**
|
||||
* Transforms elements, manager says it could move to appropriate {@link com.jetbrains.python.refactoring.classes.membersManager.PyMemberInfo}.
|
||||
* Transforms elements, manager says it could move to appropriate {@link PyMemberInfo}.
|
||||
* Types are checked at runtime.
|
||||
*
|
||||
* @param pyClass class whose members we want to move
|
||||
* @param manager manager that should check class and report list of memebers
|
||||
* @param manager manager that should check class and report list of members
|
||||
* @return member infos
|
||||
*/
|
||||
//TODO: Move to TypeSafeMovingStrategy
|
||||
@@ -183,11 +183,11 @@ public abstract class MembersManager<T extends PyElement> implements Function<T,
|
||||
|
||||
|
||||
/**
|
||||
* Returns list of elements that may require reference storing aid from {@link com.jetbrains.python.refactoring.classes.PyClassRefactoringUtil#rememberNamedReferences(com.intellij.psi.PsiElement, String...)}
|
||||
* Returns list of elements that may require reference storing aid from {@link com.jetbrains.python.refactoring.classes.PyClassRefactoringUtil#rememberNamedReferences(PsiElement, String...)}
|
||||
*
|
||||
* @param elements members chosen by user. In most cases members their selves could be stored, but different managers may support other strategies
|
||||
* @return elements to store
|
||||
* @see #moveAllMembers(java.util.Collection, com.jetbrains.python.psi.PyClass, com.jetbrains.python.psi.PyClass...)
|
||||
* @see #moveAllMembers(Collection, PyClass, PyClass...)
|
||||
*/
|
||||
protected Collection<? extends PyElement> getElementsToStoreReferences(@NotNull final Collection<T> elements) {
|
||||
return elements;
|
||||
@@ -195,10 +195,10 @@ public abstract class MembersManager<T extends PyElement> implements Function<T,
|
||||
|
||||
/**
|
||||
* Moves element from one class to another. Returns members that may require reference restoring aid from
|
||||
* ({@link com.jetbrains.python.refactoring.classes.PyClassRefactoringUtil#restoreNamedReferences(com.intellij.psi.PsiElement)})
|
||||
* Sort members according to their dependncies, before calling this method
|
||||
* ({@link com.jetbrains.python.refactoring.classes.PyClassRefactoringUtil#restoreNamedReferences(PsiElement)})
|
||||
* Sort members according to their dependencies, before calling this method
|
||||
*
|
||||
* @see #getElementsToStoreReferences(java.util.Collection)
|
||||
* @see #getElementsToStoreReferences(Collection)
|
||||
*/
|
||||
protected abstract Collection<PyElement> moveMembers(
|
||||
@NotNull PyClass from,
|
||||
@@ -207,7 +207,7 @@ public abstract class MembersManager<T extends PyElement> implements Function<T,
|
||||
|
||||
|
||||
/**
|
||||
* Creates {@link com.jetbrains.python.refactoring.classes.membersManager.PyMemberInfo} from {@link com.jetbrains.python.psi.PyElement}
|
||||
* Creates {@link PyMemberInfo} from {@link PyElement}
|
||||
* This process is plugin-specific and should be implemented in each plugin
|
||||
*
|
||||
* @param input element
|
||||
@@ -310,7 +310,7 @@ public abstract class MembersManager<T extends PyElement> implements Function<T,
|
||||
protected abstract MultiMap<PyClass, PyElement> getDependencies(@NotNull PyElement member);
|
||||
|
||||
/**
|
||||
* Get dependencies by members and classes they declared in (obtained from {@link #getDependencies(com.jetbrains.python.psi.PyElement)})
|
||||
* Get dependencies by members and classes they declared in (obtained from {@link #getDependencies(PyElement)})
|
||||
* For example manager, responsible for "extends SomeClass" members may return list of classes
|
||||
*
|
||||
* @param usedElements class-to-element dependencies
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ class NamePredicate extends NotNullPredicate<PyElement> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if collection has {@link com.jetbrains.python.psi.PyElement} with name equals to name of provided element.
|
||||
* Checks if collection has {@link PyElement} with name equals to name of provided element.
|
||||
* If element has no name -- returns false any way.
|
||||
* @param needle element to take name from
|
||||
* @param stock collection elements to search between
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ import com.jetbrains.python.psi.PyElement;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* Filters out named elements (ones that subclasses {@link com.intellij.psi.PsiNamedElement}) and {@link com.jetbrains.python.psi.PyElement})
|
||||
* Filters out named elements (ones that subclasses {@link PsiNamedElement}) and {@link PyElement})
|
||||
* that are null or has null name.
|
||||
* You need it sometimes when code has errors (i.e. bad formatted code with annotation may treat annotation as method with null name.
|
||||
*
|
||||
|
||||
+2
-2
@@ -32,8 +32,8 @@ import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Processor for member-based refactorings. It moves members from one place to another using {@link com.jetbrains.python.refactoring.classes.membersManager.MembersManager}.
|
||||
* Inheritors only need to implement {@link com.intellij.usageView.UsageViewDescriptor} methods (while this interface is also implemented by this class)
|
||||
* Processor for member-based refactorings. It moves members from one place to another using {@link MembersManager}.
|
||||
* Inheritors only need to implement {@link UsageViewDescriptor} methods (while this interface is also implemented by this class)
|
||||
*
|
||||
* @author Ilya.Kazakevich
|
||||
*/
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ import com.jetbrains.python.psi.PyRecursiveElementVisitor;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* Recursive visitor with multimap, to be used for {@link com.jetbrains.python.refactoring.classes.membersManager.MembersManager#getDependencies(com.jetbrains.python.psi.PyElement)}
|
||||
* Recursive visitor with multimap, to be used for {@link MembersManager#getDependencies(PyElement)}
|
||||
*/
|
||||
class PyRecursiveElementVisitorWithResult extends PyRecursiveElementVisitor {
|
||||
@NotNull
|
||||
|
||||
+2
-2
@@ -18,8 +18,8 @@ package com.jetbrains.python.refactoring.classes.membersManager.vp;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* To be thrown when {@link com.jetbrains.python.refactoring.classes.membersManager.vp.MembersBasedViewSwingImpl} or its children
|
||||
* assumes that data entered by user in {@link com.jetbrains.python.refactoring.classes.membersManager.vp.MembersBasedView} is invalid.
|
||||
* To be thrown when {@link MembersBasedViewSwingImpl} or its children
|
||||
* assumes that data entered by user in {@link MembersBasedView} is invalid.
|
||||
* See {@link MembersBasedPresenterImpl#validateView()} for info why exception user
|
||||
* @author Ilya.Kazakevich
|
||||
*/
|
||||
|
||||
+3
-3
@@ -30,8 +30,8 @@ import java.util.Collection;
|
||||
/**
|
||||
* All presenters that use members inherits this class.
|
||||
* <strong>Warning</strong>: Do not inherit it directly.
|
||||
* Check {@link com.jetbrains.python.refactoring.classes.membersManager.vp.MembersBasedPresenterNoPreviewImpl}
|
||||
* or {@link com.jetbrains.python.refactoring.classes.membersManager.vp.MembersBasedPresenterWithPreviewImpl} instead
|
||||
* Check {@link MembersBasedPresenterNoPreviewImpl}
|
||||
* or {@link MembersBasedPresenterWithPreviewImpl} instead
|
||||
*
|
||||
* @param <T> view for that presenter
|
||||
* @param <M> Type of model {@link #myModel}
|
||||
@@ -92,7 +92,7 @@ abstract class MembersBasedPresenterImpl<T extends MembersBasedView<?>,
|
||||
/**
|
||||
* Validates view (used by presenter to check if view is valid).
|
||||
* When overwrite, <strong>always</strong> call "super" <strong>first</strong>!
|
||||
* Throw {@link com.jetbrains.python.refactoring.classes.membersManager.vp.BadDataException} in case of error.
|
||||
* Throw {@link BadDataException} in case of error.
|
||||
* Do nothing, otherwise.
|
||||
* Method is designed to be overwritten and exception is used to simplify this process: children do not need parent's result.
|
||||
* They just call super.
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ import com.jetbrains.python.refactoring.classes.membersManager.PyMemberInfo;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* Does refactoring with preview (based on {@link com.intellij.refactoring.BaseRefactoringProcessor}).
|
||||
* Does refactoring with preview (based on {@link BaseRefactoringProcessor}).
|
||||
* Child must implement {@link #createProcessor()} and return appropriate processor.
|
||||
* "Preview" button would be displayed.
|
||||
*
|
||||
|
||||
+2
-2
@@ -29,7 +29,7 @@ import java.util.Collection;
|
||||
* First, configure it with {@link #configure(MembersViewInitializationInfo)}.
|
||||
* Then, display with {@link #initAndShow()}
|
||||
*
|
||||
* @param <C> initialization info for this view. See {@link com.jetbrains.python.refactoring.classes.membersManager.vp.MembersViewInitializationInfo}
|
||||
* @param <C> initialization info for this view. See {@link MembersViewInitializationInfo}
|
||||
* for more info
|
||||
* @author Ilya.Kazakevich
|
||||
*/
|
||||
@@ -71,7 +71,7 @@ public interface MembersBasedView<C extends MembersViewInitializationInfo> {
|
||||
Collection<PyMemberInfo<PyElement>> getSelectedMemberInfos();
|
||||
|
||||
/**
|
||||
* Runs refactoring based on {@link com.intellij.refactoring.BaseRefactoringProcessor}.
|
||||
* Runs refactoring based on {@link BaseRefactoringProcessor}.
|
||||
* It may display "preview" first.
|
||||
*
|
||||
* @param processor refactoring processor
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ import java.awt.*;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* {@link com.jetbrains.python.refactoring.classes.membersManager.vp.MembersBasedView} implementation on swing.
|
||||
* {@link MembersBasedView} implementation on swing.
|
||||
* Consists of {@link #myTopPanel} and {@link #myCenterPanel}. Children must fill them in constructor.
|
||||
* Presenter is stored in {@link #myPresenter}.
|
||||
* Panel with members in {@link #myPyMemberSelectionPanel}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user