GitOrigin-RevId: 5508035a2332963d2615f5758fdfa056a3ac034f
This commit is contained in:
Vladimir Krivosheev
2024-12-25 19:43:38 +01:00
committed by intellij-monorepo-bot
parent 051ed2529b
commit 06e5dcf7db
2310 changed files with 13083 additions and 25402 deletions

View File

@@ -1,18 +1,4 @@
/*
* Copyright 2000-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.jetbrains.debugger;
import org.jetbrains.annotations.ApiStatus;
@@ -91,10 +77,8 @@ public abstract class BreakpointTarget {
* A target that refers to a script by its name. Breakpoint will be set on every matching script currently loaded in VM.
*/
public static final class ScriptName extends BreakpointTarget {
@NotNull
private final String name;
@Nullable
private final Script script;
private final @NotNull String name;
private final @Nullable Script script;
public ScriptName(@NotNull String name) {
this.name = name;
@@ -106,13 +90,11 @@ public abstract class BreakpointTarget {
this.name = script.getUrl().toDecodedForm();
}
@NotNull
public String getName() {
public @NotNull String getName() {
return name;
}
@Nullable
public Script getScript() {
public @Nullable Script getScript() {
return script;
}

View File

@@ -1,18 +1,4 @@
/*
* Copyright 2000-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.jetbrains.debugger;
import org.jetbrains.annotations.ApiStatus;
@@ -40,21 +26,18 @@ public class VariableImpl implements Variable {
this(name, value, null);
}
@Nullable
@Override
public final ValueModifier getValueModifier() {
public final @Nullable ValueModifier getValueModifier() {
return valueModifier;
}
@NotNull
@Override
public final String getName() {
public final @NotNull String getName() {
return name;
}
@Nullable
@Override
public final Value getValue() {
public final @Nullable Value getValue() {
return value;
}

View File

@@ -1,18 +1,4 @@
/*
* Copyright 2000-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.jetbrains.debugger;
import org.jetbrains.annotations.ApiStatus;
@@ -35,9 +21,8 @@ public abstract class VariablesHost<VALUE_MANAGER extends ValueManager> {
return host.valueManager.getCacheStamp() == host.cacheStamp;
}
@NotNull
@Override
public Promise load(@NotNull VariablesHost host) {
public @NotNull Promise load(@NotNull VariablesHost host) {
return host.valueManager.isObsolete() ? Promises.cancelledPromise() : host.load();
}
};
@@ -56,13 +41,11 @@ public abstract class VariablesHost<VALUE_MANAGER extends ValueManager> {
/**
* You must call {@link #updateCacheStamp()} when data loaded
*/
@NotNull
public final Promise<List<Variable>> get() {
public final @NotNull Promise<List<Variable>> get() {
return VARIABLES_LOADER.get(this);
}
@Nullable
public final Promise.State getState() {
public final @Nullable Promise.State getState() {
return VARIABLES_LOADER.getState(this);
}
@@ -71,8 +54,7 @@ public abstract class VariablesHost<VALUE_MANAGER extends ValueManager> {
VARIABLES_LOADER.set(this, result);
}
@NotNull
protected abstract Promise<List<Variable>> load();
protected abstract @NotNull Promise<List<Variable>> load();
public final void updateCacheStamp() {
cacheStamp = valueManager.getCacheStamp();

View File

@@ -1,18 +1,4 @@
/*
* Copyright 2000-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.jetbrains.debugger;
import com.intellij.execution.ExecutionException;
@@ -39,8 +25,7 @@ import java.net.InetSocketAddress;
*/
@Deprecated
public interface DebuggableRunConfiguration extends RunConfiguration {
@NotNull
default InetSocketAddress computeDebugAddress(RunProfileState state) throws ExecutionException {
default @NotNull InetSocketAddress computeDebugAddress(RunProfileState state) throws ExecutionException {
try {
return new InetSocketAddress(InetAddress.getLoopbackAddress(), NetUtils.findAvailableSocketPort());
}

View File

@@ -54,7 +54,7 @@ public final class PsiVisitors {
* @deprecated Use a specific visitor suitable for your task, the purpose of this one is unclear.
*/
@Deprecated
public static abstract class FilteringPsiRecursiveElementWalkingVisitor extends PsiRecursiveElementWalkingVisitor {
public abstract static class FilteringPsiRecursiveElementWalkingVisitor extends PsiRecursiveElementWalkingVisitor {
@Override
public void visitElement(@NotNull PsiElement element) {
if (!(element instanceof ForeignLeafPsiElement) && element.isPhysical()) {

View File

@@ -1,6 +1,4 @@
/*
* Copyright 2000-2017 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.
*/
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.jetbrains.debugger;
import com.intellij.execution.Executor;
@@ -56,9 +54,8 @@ public abstract class RemoteDebugConfiguration extends LocatableConfigurationBas
this.defaultPort = defaultPort;
}
@Nullable
@Attribute
public String getHost() {
public @Nullable String getHost() {
return host;
}
@@ -80,15 +77,13 @@ public abstract class RemoteDebugConfiguration extends LocatableConfigurationBas
this.port = port;
}
@NotNull
@Override
public SettingsEditor<? extends RunConfiguration> getConfigurationEditor() {
public @NotNull SettingsEditor<? extends RunConfiguration> getConfigurationEditor() {
return new RemoteDebugConfigurationSettingsEditor();
}
@Nullable
@Override
public RunProfileState getState(@NotNull Executor executor, @NotNull ExecutionEnvironment env) {
public @Nullable RunProfileState getState(@NotNull Executor executor, @NotNull ExecutionEnvironment env) {
return EmptyRunProfileState.INSTANCE;
}
@@ -117,9 +112,8 @@ public abstract class RemoteDebugConfiguration extends LocatableConfigurationBas
XmlSerializer.serializeInto(this, element, serializationFilter);
}
@NotNull
@Override
public InetSocketAddress computeDebugAddress(RunProfileState state) {
public @NotNull InetSocketAddress computeDebugAddress(RunProfileState state) {
if (host == null) {
return new InetSocketAddress(InetAddress.getLoopbackAddress(), port);
}
@@ -149,9 +143,8 @@ public abstract class RemoteDebugConfiguration extends LocatableConfigurationBas
configuration.setPort(portField.getNumber());
}
@NotNull
@Override
protected JComponent createEditor() {
protected @NotNull JComponent createEditor() {
return FormBuilder.createFormBuilder().addLabeledComponent(XDebuggerBundle.message("label.host"), hostField)
.addLabeledComponent(XDebuggerBundle.message("label.port"), portField).getPanel();
}