mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cleanup
This commit is contained in:
@@ -93,6 +93,7 @@ public class IdeaJdk extends JavaDependentSdkType implements JavaSdkType {
|
||||
super("IDEA JDK");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Icon getIcon() {
|
||||
return SDK_CLOSED;
|
||||
}
|
||||
@@ -103,11 +104,13 @@ public class IdeaJdk extends JavaDependentSdkType implements JavaSdkType {
|
||||
return "reference.project.structure.sdk.idea";
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public Icon getIconForAddAction() {
|
||||
return ADD_SDK;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String suggestHomePath() {
|
||||
return PathManager.getHomePath().replace(File.separatorChar, '/');
|
||||
}
|
||||
@@ -122,28 +125,22 @@ public class IdeaJdk extends JavaDependentSdkType implements JavaSdkType {
|
||||
return super.adjustSelectedSdkHome(homePath);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValidSdkHome(String path) {
|
||||
if (isFromIDEAProject(path)) {
|
||||
return true;
|
||||
}
|
||||
File home = new File(path);
|
||||
if (!home.exists()) {
|
||||
return false;
|
||||
}
|
||||
if (getBuildNumber(path) == null || getOpenApiJar(path) == null) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return home.exists() && getBuildNumber(path) != null && getOpenApiJar(path) != null;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private static File getOpenApiJar(String home) {
|
||||
@NonNls final String openapiJar = "openapi.jar";
|
||||
@NonNls final String platformApiJar = "platform-api.jar";
|
||||
final File libDir = new File(home, LIB_DIR_NAME);
|
||||
File f = new File(libDir, openapiJar);
|
||||
if (f.exists()) return f;
|
||||
f = new File(libDir, platformApiJar);
|
||||
f = new File(libDir, "platform-api.jar");
|
||||
if (f.exists()) return f;
|
||||
return null;
|
||||
}
|
||||
@@ -155,6 +152,7 @@ public class IdeaJdk extends JavaDependentSdkType implements JavaSdkType {
|
||||
community.exists() && community.isFile();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public final String getVersionString(@NotNull final Sdk sdk) {
|
||||
final Sdk internalJavaSdk = getInternalJavaSdk(sdk);
|
||||
@@ -170,6 +168,7 @@ public class IdeaJdk extends JavaDependentSdkType implements JavaSdkType {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String suggestSdkName(String currentSdkName, String sdkHome) {
|
||||
if (isFromIDEAProject(sdkHome)) return "Local IDEA [" + sdkHome + "]";
|
||||
String buildNumber = getBuildNumber(sdkHome);
|
||||
@@ -194,9 +193,9 @@ public class IdeaJdk extends JavaDependentSdkType implements JavaSdkType {
|
||||
}
|
||||
|
||||
private static VirtualFile[] getIdeaLibrary(String home) {
|
||||
String plugins = home + File.separator + PLUGINS_DIR + File.separator;
|
||||
ArrayList<VirtualFile> result = new ArrayList<>();
|
||||
List<VirtualFile> result = new ArrayList<>();
|
||||
appendIdeaLibrary(home, result, "junit.jar");
|
||||
String plugins = home + File.separator + PLUGINS_DIR + File.separator;
|
||||
appendIdeaLibrary(plugins + "JavaEE", result, "javaee-impl.jar", "jpa-console.jar");
|
||||
appendIdeaLibrary(plugins + "PersistenceSupport", result, "persistence-impl.jar");
|
||||
appendIdeaLibrary(plugins + "DatabaseTools", result, "database-impl.jar", "jdbc-console.jar");
|
||||
@@ -207,9 +206,9 @@ public class IdeaJdk extends JavaDependentSdkType implements JavaSdkType {
|
||||
return VfsUtilCore.toVirtualFileArray(result);
|
||||
}
|
||||
|
||||
private static void appendIdeaLibrary(final String libDirPath,
|
||||
final ArrayList<VirtualFile> result,
|
||||
@NonNls final String... forbidden) {
|
||||
private static void appendIdeaLibrary(@NotNull String libDirPath,
|
||||
@NotNull List<VirtualFile> result,
|
||||
@NotNull @NonNls final String... forbidden) {
|
||||
Arrays.sort(forbidden);
|
||||
final String path = libDirPath + File.separator + LIB_DIR_NAME;
|
||||
final JarFileSystem jfs = JarFileSystem.getInstance();
|
||||
@@ -230,6 +229,7 @@ public class IdeaJdk extends JavaDependentSdkType implements JavaSdkType {
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean setupSdkPaths(@NotNull final Sdk sdk, @NotNull SdkModel sdkModel) {
|
||||
final Sandbox additionalData = (Sandbox)sdk.getSdkAdditionalData();
|
||||
if (additionalData != null) {
|
||||
@@ -287,7 +287,7 @@ public class IdeaJdk extends JavaDependentSdkType implements JavaSdkType {
|
||||
sdkModificator.setVersionString(internalJava.getVersionString());
|
||||
}
|
||||
|
||||
public static boolean isValidInternalJdk(@NotNull Sdk ideaSdk, @NotNull Sdk sdk) {
|
||||
static boolean isValidInternalJdk(@NotNull Sdk ideaSdk, @NotNull Sdk sdk) {
|
||||
SdkTypeId sdkType = sdk.getSdkType();
|
||||
if (sdkType instanceof JavaSdk) {
|
||||
JavaSdkVersion version = JavaSdk.getInstance().getVersion(sdk);
|
||||
@@ -310,24 +310,16 @@ public class IdeaJdk extends JavaDependentSdkType implements JavaSdkType {
|
||||
|
||||
private static int getIdeaClassFileVersion(File apiJar) {
|
||||
try {
|
||||
ZipFile zipFile = new ZipFile(apiJar);
|
||||
try {
|
||||
try (ZipFile zipFile = new ZipFile(apiJar)) {
|
||||
ZipEntry entry = zipFile.getEntry(ApplicationStarter.class.getName().replace('.', '/') + ".class");
|
||||
if (entry != null) {
|
||||
DataInputStream stream = new DataInputStream(zipFile.getInputStream(entry));
|
||||
try {
|
||||
try (DataInputStream stream = new DataInputStream(zipFile.getInputStream(entry))) {
|
||||
if (stream.skip(6) == 6) {
|
||||
return stream.readUnsignedShort();
|
||||
}
|
||||
}
|
||||
finally {
|
||||
stream.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
finally {
|
||||
zipFile.close();
|
||||
}
|
||||
}
|
||||
catch (IOException e) {
|
||||
LOG.info(e);
|
||||
@@ -523,16 +515,19 @@ public class IdeaJdk extends JavaDependentSdkType implements JavaSdkType {
|
||||
return wasSmthAdded;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AdditionalDataConfigurable createAdditionalDataConfigurable(@NotNull final SdkModel sdkModel, @NotNull SdkModificator sdkModificator) {
|
||||
return new IdeaJdkConfigurable(sdkModel, sdkModificator);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public String getBinPath(@NotNull Sdk sdk) {
|
||||
final Sdk internalJavaSdk = getInternalJavaSdk(sdk);
|
||||
return internalJavaSdk == null ? null : JavaSdk.getInstance().getBinPath(internalJavaSdk);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public String getToolsPath(@NotNull Sdk sdk) {
|
||||
final Sdk jdk = getInternalJavaSdk(sdk);
|
||||
@@ -542,12 +537,14 @@ public class IdeaJdk extends JavaDependentSdkType implements JavaSdkType {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public String getVMExecutablePath(@NotNull Sdk sdk) {
|
||||
final Sdk internalJavaSdk = getInternalJavaSdk(sdk);
|
||||
return internalJavaSdk == null ? null : JavaSdk.getInstance().getVMExecutablePath(internalJavaSdk);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveAdditionalData(@NotNull SdkAdditionalData additionalData, @NotNull Element additional) {
|
||||
if (additionalData instanceof Sandbox) {
|
||||
try {
|
||||
@@ -559,6 +556,7 @@ public class IdeaJdk extends JavaDependentSdkType implements JavaSdkType {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public SdkAdditionalData loadAdditionalData(@NotNull Sdk sdk, Element additional) {
|
||||
Sandbox sandbox = new Sandbox(sdk);
|
||||
try {
|
||||
@@ -570,6 +568,7 @@ public class IdeaJdk extends JavaDependentSdkType implements JavaSdkType {
|
||||
return sandbox;
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public String getPresentableName() {
|
||||
return DevKitBundle.message("sdk.title");
|
||||
@@ -594,7 +593,8 @@ public class IdeaJdk extends JavaDependentSdkType implements JavaSdkType {
|
||||
type == AnnotationOrderRootType.getInstance();
|
||||
}
|
||||
|
||||
public String getDefaultDocumentationUrl(final @NotNull Sdk sdk) {
|
||||
@Override
|
||||
public String getDefaultDocumentationUrl(@NotNull final Sdk sdk) {
|
||||
return JavaSdk.getInstance().getDefaultDocumentationUrl(sdk);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,10 +38,7 @@ import org.jetbrains.idea.devkit.DevKitBundle;
|
||||
import javax.swing.*;
|
||||
import javax.swing.event.DocumentEvent;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.awt.event.ItemEvent;
|
||||
import java.awt.event.ItemListener;
|
||||
|
||||
/**
|
||||
* @author anna
|
||||
@@ -52,8 +49,8 @@ public class IdeaJdkConfigurable implements AdditionalDataConfigurable {
|
||||
private final TextFieldWithStoredHistory mySandboxHome = new TextFieldWithStoredHistory(SANDBOX_HISTORY);
|
||||
|
||||
private final JLabel myInternalJreLabel = new JLabel("Internal Java Platform:");
|
||||
private final DefaultComboBoxModel myJdksModel = new DefaultComboBoxModel();
|
||||
private final JComboBox myInternalJres = new JComboBox(myJdksModel);
|
||||
private final DefaultComboBoxModel<Sdk> myJdksModel = new DefaultComboBoxModel<>();
|
||||
private final JComboBox<Sdk> myInternalJres = new JComboBox<>(myJdksModel);
|
||||
|
||||
private Sdk myIdeaJdk;
|
||||
|
||||
@@ -62,31 +59,35 @@ public class IdeaJdkConfigurable implements AdditionalDataConfigurable {
|
||||
|
||||
private final SdkModel mySdkModel;
|
||||
private final SdkModificator mySdkModificator;
|
||||
private boolean myFreeze = false;
|
||||
private boolean myFreeze;
|
||||
private final SdkModel.Listener myListener;
|
||||
|
||||
public IdeaJdkConfigurable(final SdkModel sdkModel, final SdkModificator sdkModificator) {
|
||||
IdeaJdkConfigurable(final SdkModel sdkModel, final SdkModificator sdkModificator) {
|
||||
mySdkModel = sdkModel;
|
||||
mySdkModificator = sdkModificator;
|
||||
myListener = new SdkModel.Listener() {
|
||||
@Override
|
||||
public void sdkAdded(Sdk sdk) {
|
||||
if (sdk.getSdkType().equals(JavaSdk.getInstance())) {
|
||||
addJavaSdk(sdk);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void beforeSdkRemove(Sdk sdk) {
|
||||
if (sdk.getSdkType().equals(JavaSdk.getInstance())) {
|
||||
removeJavaSdk(sdk);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sdkChanged(Sdk sdk, String previousName) {
|
||||
if (sdk.getSdkType().equals(JavaSdk.getInstance())) {
|
||||
updateJavaSdkList(sdk, previousName);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sdkHomeSelected(final Sdk sdk, final String newSdkHome) {
|
||||
if (sdk.getSdkType() instanceof IdeaJdk) {
|
||||
internalJdkUpdate(sdk);
|
||||
@@ -105,59 +106,57 @@ public class IdeaJdkConfigurable implements AdditionalDataConfigurable {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSdk(Sdk sdk) {
|
||||
myIdeaJdk = sdk;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JComponent createComponent() {
|
||||
mySandboxHome.setHistorySize(5);
|
||||
JPanel wholePanel = new JPanel(new GridBagLayout());
|
||||
wholePanel.add(mySandboxHomeLabel, new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 0.0, 1.0, GridBagConstraints.WEST,
|
||||
GridBagConstraints.NONE, JBUI.emptyInsets(), 0, 0));
|
||||
wholePanel.add(GuiUtils.constructFieldWithBrowseButton(mySandboxHome, new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
FileChooserDescriptor descriptor = FileChooserDescriptorFactory.createSingleFolderDescriptor();
|
||||
descriptor.setTitle(DevKitBundle.message("sandbox.home"));
|
||||
descriptor.setDescription(DevKitBundle.message("sandbox.purpose"));
|
||||
VirtualFile file = FileChooser.chooseFile(descriptor, mySandboxHome, null, null);
|
||||
if (file != null) {
|
||||
mySandboxHome.setText(FileUtil.toSystemDependentName(file.getPath()));
|
||||
}
|
||||
myModified = true;
|
||||
wholePanel.add(GuiUtils.constructFieldWithBrowseButton(mySandboxHome, e -> {
|
||||
FileChooserDescriptor descriptor = FileChooserDescriptorFactory.createSingleFolderDescriptor();
|
||||
descriptor.setTitle(DevKitBundle.message("sandbox.home"));
|
||||
descriptor.setDescription(DevKitBundle.message("sandbox.purpose"));
|
||||
VirtualFile file = FileChooser.chooseFile(descriptor, mySandboxHome, null, null);
|
||||
if (file != null) {
|
||||
mySandboxHome.setText(FileUtil.toSystemDependentName(file.getPath()));
|
||||
}
|
||||
myModified = true;
|
||||
}), new GridBagConstraints(1, GridBagConstraints.RELATIVE, 1, 1, 1.0, 1.0, GridBagConstraints.EAST,
|
||||
GridBagConstraints.HORIZONTAL, JBUI.insets(0, 30, 0, 0), 0, 0));
|
||||
GridBagConstraints.HORIZONTAL, JBUI.insets(0, 30, 0, 0), 0, 0));
|
||||
|
||||
wholePanel.add(myInternalJreLabel, new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 0, 1, GridBagConstraints.WEST,
|
||||
GridBagConstraints.NONE, JBUI.emptyInsets(), 0, 0));
|
||||
wholePanel.add(myInternalJres, new GridBagConstraints(1, GridBagConstraints.RELATIVE, 1, 1, 1, 1, GridBagConstraints.EAST,
|
||||
GridBagConstraints.HORIZONTAL, JBUI.insets(0, 30, 0, 0), 0, 0));
|
||||
myInternalJres.setRenderer(new ListCellRendererWrapper() {
|
||||
myInternalJres.setRenderer(new ListCellRendererWrapper<Sdk>() {
|
||||
@Override
|
||||
public void customize(JList list, Object value, int index, boolean selected, boolean hasFocus) {
|
||||
if (value instanceof Sdk) {
|
||||
setText(((Sdk)value).getName());
|
||||
public void customize(JList list, Sdk value, int index, boolean selected, boolean hasFocus) {
|
||||
if (value != null) {
|
||||
setText(value.getName());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
myInternalJres.addItemListener(new ItemListener() {
|
||||
public void itemStateChanged(final ItemEvent e) {
|
||||
if (myFreeze) return;
|
||||
final Sdk javaJdk = (Sdk)e.getItem();
|
||||
for (OrderRootType type : OrderRootType.getAllTypes()) {
|
||||
if (!((SdkType) javaJdk.getSdkType()).isRootTypeApplicable(type)) {
|
||||
continue;
|
||||
}
|
||||
final VirtualFile[] internalRoots = javaJdk.getSdkModificator().getRoots(type);
|
||||
final VirtualFile[] configuredRoots = mySdkModificator.getRoots(type);
|
||||
for (VirtualFile file : internalRoots) {
|
||||
if (e.getStateChange() == ItemEvent.DESELECTED) {
|
||||
mySdkModificator.removeRoot(file, type);
|
||||
} else {
|
||||
if (ArrayUtil.find(configuredRoots, file) == -1) {
|
||||
mySdkModificator.addRoot(file, type);
|
||||
}
|
||||
myInternalJres.addItemListener(e -> {
|
||||
if (myFreeze) return;
|
||||
final Sdk javaJdk = (Sdk)e.getItem();
|
||||
for (OrderRootType type : OrderRootType.getAllTypes()) {
|
||||
if (!((SdkType) javaJdk.getSdkType()).isRootTypeApplicable(type)) {
|
||||
continue;
|
||||
}
|
||||
final VirtualFile[] internalRoots = javaJdk.getSdkModificator().getRoots(type);
|
||||
final VirtualFile[] configuredRoots = mySdkModificator.getRoots(type);
|
||||
for (VirtualFile file : internalRoots) {
|
||||
if (e.getStateChange() == ItemEvent.DESELECTED) {
|
||||
mySdkModificator.removeRoot(file, type);
|
||||
} else {
|
||||
if (ArrayUtil.find(configuredRoots, file) == -1) {
|
||||
mySdkModificator.addRoot(file, type);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -165,15 +164,12 @@ public class IdeaJdkConfigurable implements AdditionalDataConfigurable {
|
||||
});
|
||||
|
||||
mySandboxHome.addDocumentListener(new DocumentAdapter() {
|
||||
@Override
|
||||
protected void textChanged(DocumentEvent e) {
|
||||
myModified = true;
|
||||
}
|
||||
});
|
||||
mySandboxHome.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
myModified = true;
|
||||
}
|
||||
});
|
||||
mySandboxHome.addActionListener(e -> myModified = true);
|
||||
mySandboxHome.setText("");
|
||||
myModified = true;
|
||||
return wholePanel;
|
||||
@@ -188,10 +184,12 @@ public class IdeaJdkConfigurable implements AdditionalDataConfigurable {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isModified() {
|
||||
return myModified;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply() throws ConfigurationException {
|
||||
/*if (mySandboxHome.getText() == null || mySandboxHome.getText().length() == 0) {
|
||||
throw new ConfigurationException(DevKitBundle.message("sandbox.specification"));
|
||||
@@ -204,11 +202,12 @@ public class IdeaJdkConfigurable implements AdditionalDataConfigurable {
|
||||
Sandbox sandbox = new Sandbox(mySandboxHome.getText(), (Sdk)myInternalJres.getSelectedItem(), myIdeaJdk);
|
||||
final SdkModificator modificator = myIdeaJdk.getSdkModificator();
|
||||
modificator.setSdkAdditionalData(sandbox);
|
||||
ApplicationManager.getApplication().runWriteAction(() -> modificator.commitChanges());
|
||||
ApplicationManager.getApplication().runWriteAction(modificator::commitChanges);
|
||||
((ProjectJdkImpl) myIdeaJdk).resetVersionString();
|
||||
myModified = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reset() {
|
||||
myFreeze = true;
|
||||
updateJdkList();
|
||||
@@ -222,7 +221,7 @@ public class IdeaJdkConfigurable implements AdditionalDataConfigurable {
|
||||
final Sdk internalJava = sandbox.getJavaSdk();
|
||||
if (internalJava != null) {
|
||||
for (int i = 0; i < myJdksModel.getSize(); i++) {
|
||||
if (Comparing.strEqual(((Sdk)myJdksModel.getElementAt(i)).getName(), internalJava.getName())){
|
||||
if (Comparing.strEqual(myJdksModel.getElementAt(i).getName(), internalJava.getName())){
|
||||
myInternalJres.setSelectedIndex(i);
|
||||
break;
|
||||
}
|
||||
@@ -234,6 +233,7 @@ public class IdeaJdkConfigurable implements AdditionalDataConfigurable {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disposeUIResources() {
|
||||
mySdkModel.removeListener(myListener);
|
||||
}
|
||||
|
||||
@@ -36,9 +36,9 @@ public enum IntelliJPlatformProduct {
|
||||
GOIDE("GO", "Gogland", PlatformUtils.GOIDE_PREFIX),
|
||||
ANDROID_STUDIO("AI", "Android Studio", "AndroidStudio");
|
||||
|
||||
private String myProductCode;
|
||||
private String myName;
|
||||
private String myPlatformPrefix;
|
||||
private final String myProductCode;
|
||||
private final String myName;
|
||||
private final String myPlatformPrefix;
|
||||
|
||||
public String getName() {
|
||||
return myName;
|
||||
|
||||
@@ -38,14 +38,14 @@ import org.jetbrains.idea.devkit.DevKitBundle;
|
||||
public class Sandbox implements ValidatableSdkAdditionalData {
|
||||
private static final Logger LOG = Logger.getInstance("#org.jetbrains.idea.devkit.projectRoots.Sandbox");
|
||||
|
||||
@SuppressWarnings({"WeakerAccess"})
|
||||
@SuppressWarnings("WeakerAccess")
|
||||
public String mySandboxHome;
|
||||
private final Sdk myCurrentJdk;
|
||||
|
||||
private String myJavaSdkName;
|
||||
private Sdk myJavaSdk;
|
||||
|
||||
private LocalFileSystem.WatchRequest mySandboxRoot = null;
|
||||
private LocalFileSystem.WatchRequest mySandboxRoot;
|
||||
@NonNls private static final String SDK = "sdk";
|
||||
|
||||
public Sandbox(String sandboxHome, Sdk javaSdk, Sdk currentJdk) {
|
||||
@@ -66,17 +66,20 @@ public class Sandbox implements ValidatableSdkAdditionalData {
|
||||
return mySandboxHome;
|
||||
}
|
||||
|
||||
@SuppressWarnings("MethodDoesntCallSuperMethod")
|
||||
@Override
|
||||
public Object clone() throws CloneNotSupportedException {
|
||||
return new Sandbox(mySandboxHome, getJavaSdk(), myCurrentJdk);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkValid(SdkModel sdkModel) throws ConfigurationException {
|
||||
if (StringUtil.isEmpty(mySandboxHome) || getJavaSdk() == null) {
|
||||
throw new ConfigurationException(DevKitBundle.message("sandbox.specification"));
|
||||
}
|
||||
}
|
||||
|
||||
public void readExternal(Element element) throws InvalidDataException {
|
||||
void readExternal(Element element) throws InvalidDataException {
|
||||
DefaultJDOMExternalizer.readExternal(this, element);
|
||||
LOG.assertTrue(mySandboxRoot == null);
|
||||
myJavaSdkName = element.getAttributeValue(SDK);
|
||||
@@ -85,7 +88,7 @@ public class Sandbox implements ValidatableSdkAdditionalData {
|
||||
}
|
||||
}
|
||||
|
||||
public void writeExternal(Element element) throws WriteExternalException {
|
||||
void writeExternal(Element element) throws WriteExternalException {
|
||||
DefaultJDOMExternalizer.writeExternal(this, element);
|
||||
final Sdk sdk = getJavaSdk();
|
||||
if (sdk != null) {
|
||||
@@ -119,7 +122,7 @@ public class Sandbox implements ValidatableSdkAdditionalData {
|
||||
return myJavaSdk;
|
||||
}
|
||||
|
||||
public void setJavaSdk(final Sdk javaSdk) {
|
||||
void setJavaSdk(final Sdk javaSdk) {
|
||||
myJavaSdk = javaSdk;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user