mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
groovy converter migrated to new api
This commit is contained in:
@@ -3,6 +3,7 @@ package com.intellij.conversion;
|
||||
import org.jdom.Element;
|
||||
import org.jdom.Document;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Collection;
|
||||
@@ -15,6 +16,9 @@ public interface ModuleSettings extends ComponentManagerSettings {
|
||||
@NotNull
|
||||
String getModuleName();
|
||||
|
||||
@Nullable
|
||||
String getModuleType();
|
||||
|
||||
@NotNull
|
||||
File getModuleFile();
|
||||
|
||||
@@ -26,4 +30,6 @@ public interface ModuleSettings extends ComponentManagerSettings {
|
||||
|
||||
@NotNull
|
||||
Document getDocument();
|
||||
|
||||
void setModuleType(@NotNull String moduleType);
|
||||
}
|
||||
|
||||
@@ -6,8 +6,10 @@ import com.intellij.facet.FacetManagerImpl;
|
||||
import com.intellij.ide.highlighter.ModuleFileType;
|
||||
import com.intellij.ide.impl.convert.JDomConvertingUtil;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.openapi.module.impl.ModuleImpl;
|
||||
import org.jdom.Element;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
@@ -29,6 +31,11 @@ public class ModuleSettingsImpl extends ComponentManagerSettingsImpl implements
|
||||
return myModuleName;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public String getModuleType() {
|
||||
return myRootElement.getAttributeValue(ModuleImpl.ELEMENT_TYPE);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public File getModuleFile() {
|
||||
return myFile;
|
||||
@@ -47,4 +54,8 @@ public class ModuleSettingsImpl extends ComponentManagerSettingsImpl implements
|
||||
}
|
||||
return elements;
|
||||
}
|
||||
|
||||
public void setModuleType(@NotNull String moduleType) {
|
||||
myRootElement.setAttribute(ModuleImpl.ELEMENT_TYPE, moduleType);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user