mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cleanup (remove deprecated methods)
This commit is contained in:
-1
@@ -287,7 +287,6 @@ public class ApplicationConfiguration extends ModuleBasedConfiguration<JavaRunCo
|
||||
syncOldStateFields();
|
||||
|
||||
JavaRunConfigurationExtensionManager.getInstance().readExternal(this, element);
|
||||
setShortenCommandLine(ShortenCommandLine.readShortenClasspathMethod(element));
|
||||
myInputRedirectOptions.readExternal(element);
|
||||
}
|
||||
|
||||
|
||||
@@ -54,6 +54,7 @@ public enum ShortenCommandLine {
|
||||
return CLASSPATH_FILE;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static ShortenCommandLine readShortenClasspathMethod(@NotNull Element element) {
|
||||
Element mode = element.getChild("shortenClasspath");
|
||||
if (mode != null) {
|
||||
|
||||
+7
-2
@@ -12,7 +12,6 @@ import com.intellij.openapi.components.BaseState;
|
||||
import com.intellij.openapi.components.PersistentStateComponent;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.InvalidDataException;
|
||||
import com.intellij.openapi.util.JDOMExternalizerUtil;
|
||||
import com.intellij.openapi.util.UserDataHolderBase;
|
||||
import com.intellij.openapi.util.WriteExternalException;
|
||||
import com.intellij.openapi.util.text.StringUtilRt;
|
||||
@@ -250,7 +249,13 @@ public abstract class RunConfigurationBase extends UserDataHolderBase implements
|
||||
|
||||
@Override
|
||||
public void writeExternal(@NotNull Element element) throws WriteExternalException {
|
||||
JDOMExternalizerUtil.addChildren(element, PREDEFINED_LOG_FILE_ELEMENT, myPredefinedLogFiles);
|
||||
for (PredefinedLogFile child : myPredefinedLogFiles) {
|
||||
if (child != null) {
|
||||
Element element1 = new Element(PREDEFINED_LOG_FILE_ELEMENT);
|
||||
child.writeExternal(element1);
|
||||
element.addContent(element1);
|
||||
}
|
||||
}
|
||||
XmlSerializer.serializeObjectInto(myOptions, element);
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ import org.jdom.Element;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@@ -117,26 +116,7 @@ public class JDOMExternalizerUtil {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public static void addChildren(@NotNull Element parent,
|
||||
@NotNull String childElementName,
|
||||
@NotNull Collection<? extends JDOMExternalizable> children) throws WriteExternalException {
|
||||
for (JDOMExternalizable child : children) {
|
||||
if (child != null) {
|
||||
Element element = new Element(childElementName);
|
||||
child.writeExternal(element);
|
||||
parent.addContent(element);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//<editor-fold desc="Deprecated stuff.">
|
||||
/** @deprecated use {@link #readOption(Element, String)} (to be removed in IDEA 2019) */
|
||||
@Deprecated
|
||||
public static Element getOption(@NotNull Element parent, @NotNull String fieldName) {
|
||||
return readOption(parent, fieldName);
|
||||
}
|
||||
|
||||
/** @deprecated use {@link #writeCustomField(Element, String, String)} (to be removed in IDEA 2019) */
|
||||
@Deprecated
|
||||
public static Element addElementWithValueAttribute(@NotNull Element parent, @NotNull String childTagName, @Nullable String attrValue) {
|
||||
|
||||
Reference in New Issue
Block a user