Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intellij idea13.1 #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,15 @@
</p>
<p>Project home: <a href="https://github.com/ronniekk/intelliguard">https://github.com/ronniekk/intelliguard</a>
]]></description>
<version>0.10</version>
<version>0.11</version>
<vendor url="https://github.com/ronniekk/intelliguard" logo="/com/googlecode/intelliguard/guard_mask_16x16.png" email="ronnie.kolehmainen at gmail.com">Ronnie Kolehmainen</vendor>
<change-notes><![CDATA[
<ul>0.11
<li>Build for IDEA 13</li>
<li>Minimal tested version: 12.0.4</li>
<li>Fixed icon issue</li>
<li>Migrate from deprecated intellij openapi</li>
</ul>
<ul>0.10
<li>Build for IDEA 12</li>
</ul>
Expand Down
3 changes: 2 additions & 1 deletion intelliguard.iml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
<sourceFolder url="file://$MODULE_DIR$/resources" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="jdk" jdkName="IDEA Plugin Development SDK" jdkType="IDEA JDK" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="ant" level="project" />
</component>
</module>

4 changes: 2 additions & 2 deletions src/com/github/intelliguard/generator/ProGuardGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
import com.github.intelliguard.facet.GuardFacet;
import com.github.intelliguard.facet.GuardFacetConfiguration;
import com.github.intelliguard.model.Keeper;
import com.intellij.openapi.roots.OrderEnumerator;
import com.intellij.util.PathsList;
import com.intellij.openapi.roots.ProjectRootsTraversing;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.openapi.vfs.VfsUtil;

Expand Down Expand Up @@ -48,7 +48,7 @@ public static String generatePro(@NotNull GuardFacet facet)
sb.append(MessageFormat.format(IN_JARS, escape(inFile)));
sb.append(MessageFormat.format(OUT_JARS, escape(outFile)));

final PathsList dependenciesList = ProjectRootsTraversing.collectRoots(facet.getModule(), ProjectRootsTraversing.LIBRARIES_AND_JDK);
final PathsList dependenciesList = OrderEnumerator.orderEntries(facet.getModule()).withoutDepModules().withoutModuleSourceEntries().getPathsList();
final List<VirtualFile> externalDependencies = dependenciesList.getVirtualFiles();
for (VirtualFile dependencyJar : externalDependencies)
{
Expand Down
4 changes: 2 additions & 2 deletions src/com/github/intelliguard/generator/YGuardGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
import com.github.intelliguard.facet.GuardFacet;
import com.github.intelliguard.facet.GuardFacetConfiguration;
import com.github.intelliguard.model.Keeper;
import com.intellij.openapi.roots.OrderEnumerator;
import com.intellij.openapi.vfs.VfsUtil;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.openapi.roots.ProjectRootsTraversing;
import com.intellij.util.PathsList;

import java.text.MessageFormat;
Expand Down Expand Up @@ -57,7 +57,7 @@ public static String generateBuildXml(@NotNull GuardFacet facet)
sb.append(OPEN_YGUARD);
sb.append(MessageFormat.format(IN_OUT_PAIR, inFile, outFile));

final PathsList dependenciesList = ProjectRootsTraversing.collectRoots(facet.getModule(), ProjectRootsTraversing.LIBRARIES_AND_JDK);
final PathsList dependenciesList = OrderEnumerator.orderEntries(facet.getModule()).withoutDepModules().withoutModuleSourceEntries().getPathsList();
final List<VirtualFile> externalDependencies = dependenciesList.getVirtualFiles();
if (!externalDependencies.isEmpty())
{
Expand Down
5 changes: 3 additions & 2 deletions src/com/github/intelliguard/runner/JarTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import com.intellij.openapi.module.Module;
import com.intellij.openapi.compiler.make.ManifestBuilder;
import com.intellij.openapi.roots.ProjectRootsTraversing;
import com.intellij.openapi.roots.OrderEnumerator;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.util.PathsList;
import com.github.intelliguard.model.JarConfig;
Expand Down Expand Up @@ -169,7 +169,8 @@ private Manifest createManifest(@Nullable Manifest manifest, @NotNull JarConfig
String libsPrefix = jarConfig.getLinkLibraries();
if (libsPrefix != null)
{
PathsList dependenciesList = ProjectRootsTraversing.collectRoots(module, ProjectRootsTraversing.PROJECT_LIBRARIES);
PathsList dependenciesList = OrderEnumerator.orderEntries(module).withoutSdk().withoutLibraries().withoutDepModules().getSourcePathsList();
// ProjectRootsTraversing.collectRoots(module, ProjectRootsTraversing.PROJECT_LIBRARIES);
List<VirtualFile> virtualFileList = dependenciesList.getVirtualFiles();
if (!virtualFileList.isEmpty())
{
Expand Down
2 changes: 1 addition & 1 deletion src/com/github/intelliguard/ui/JarOptionsForm.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public class JarOptionsForm
private TextFieldWithBrowseButton obfuscatedJarPath;
private TextFieldWithBrowseButton mainClass;
private static final Icon FOLDER_ICON = IconLoader.getIcon("/nodes/folder.png");
private static final Icon MODULE_ICON = IconLoader.getIcon("/nodes/ModuleClosed.png");
private static final Icon MODULE_ICON = IconLoader.getIcon("/nodes/moduleGroup.png");
private static final Icon JAR_ICON = IconLoader.getIcon("/fileTypes/archive.png");

public JarOptionsForm(@NotNull GuardFacet guardFacet)
Expand Down