当前位置: 首页>>代码示例>>Java>>正文


Java IdeaWin32类代码示例

本文整理汇总了Java中com.intellij.openapi.util.io.win32.IdeaWin32的典型用法代码示例。如果您正苦于以下问题:Java IdeaWin32类的具体用法?Java IdeaWin32怎么用?Java IdeaWin32使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


IdeaWin32类属于com.intellij.openapi.util.io.win32包,在下文中一共展示了IdeaWin32类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: loadPlatformLibrary

import com.intellij.openapi.util.io.win32.IdeaWin32; //导入依赖的package包/类
public static void loadPlatformLibrary(@NotNull String libName) {
  String libFileName = mapLibraryName(libName);
  String libPath = PathManager.getBinPath() + "/" + libFileName;

  if (!new File(libPath).exists()) {
    String platform = getPlatformName();
    if (!new File(libPath = PathManager.getHomePath() + "/community/bin/" + platform + libFileName).exists()) {
      if (!new File(libPath = PathManager.getHomePath() + "/bin/" + platform + libFileName).exists()) {
        if (!new File(libPath = PathManager.getHomePathFor(IdeaWin32.class) + "/bin/" + libFileName).exists()) {
          File libDir = new File(PathManager.getBinPath());
          throw new UnsatisfiedLinkError("'" + libFileName + "' not found in '" + libDir + "' among " + Arrays.toString(libDir.list()));
        }
      }
    }
  }

  System.load(libPath);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:UrlClassLoader.java

示例2: getAttributes

import com.intellij.openapi.util.io.win32.IdeaWin32; //导入依赖的package包/类
@NotNull
private static FileAttributes getAttributes(@NotNull final File file, final boolean checkList) {
  final FileAttributes attributes = FileSystemUtil.getAttributes(file);
  assertNotNull(attributes);

  if (SystemInfo.isWindows && checkList) {
    final String parent = file.getParent();
    if (parent != null) {
      final FileInfo[] infos = IdeaWin32.getInstance().listChildren(parent);
      assertNotNull(infos);
      for (FileInfo info : infos) {
        if (file.getName().equals(info.getName())) {
          assertEquals(attributes, info.toFileAttributes());
          return attributes;
        }
      }
      fail(file + " not listed");
    }
  }

  return attributes;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:FileAttributesReadingTest.java

示例3: getAttributes

import com.intellij.openapi.util.io.win32.IdeaWin32; //导入依赖的package包/类
@Nonnull
private static FileAttributes getAttributes(@Nonnull final File file, final boolean checkList) {
  final FileAttributes attributes = FileSystemUtil.getAttributes(file);
  assertNotNull(attributes);
  System.out.println(attributes + ": " + file);

  if (SystemInfo.isWindows && checkList) {
    final String parent = file.getParent();
    if (parent != null) {
      final FileInfo[] infos = IdeaWin32.getInstance().listChildren(parent);
      assertNotNull(infos);
      for (FileInfo info : infos) {
        if (file.getName().equals(info.getName())) {
          assertEquals(attributes, info.toFileAttributes());
          return attributes;
        }
      }
      fail(file + " not listed");
    }
  }

  return attributes;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:24,代码来源:FileAttributesReadingTest.java

示例4: assertDirectoriesEqual

import com.intellij.openapi.util.io.win32.IdeaWin32; //导入依赖的package包/类
private static void assertDirectoriesEqual(@NotNull final File dir) {
  final String[] list1 = dir.list();
  assertNotNull(list1);
  final FileInfo[] list2 = IdeaWin32.getInstance().listChildren(dir.getPath());
  assertNotNull(list2);
  if (list1.length + 2 != list2.length) {
    assertEquals(Arrays.toString(list1), Arrays.toString(list2));
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:FileAttributesReadingTest.java

示例5: assertDirectoriesEqual

import com.intellij.openapi.util.io.win32.IdeaWin32; //导入依赖的package包/类
private static void assertDirectoriesEqual(@Nonnull final File dir) {
  final String[] list1 = dir.list();
  assertNotNull(list1);
  final FileInfo[] list2 = IdeaWin32.getInstance().listChildren(dir.getPath());
  assertNotNull(list2);
  if (list1.length + 2 != list2.length) {
    assertEquals(Arrays.toString(list1), Arrays.toString(list2));
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:10,代码来源:FileAttributesReadingTest.java

示例6: isAvailable

import com.intellij.openapi.util.io.win32.IdeaWin32; //导入依赖的package包/类
public static boolean isAvailable() {
  return IdeaWin32.isAvailable();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:Win32LocalFileSystem.java

示例7: setUp

import com.intellij.openapi.util.io.win32.IdeaWin32; //导入依赖的package包/类
@Before
public void setUp() {
  assumeTrue(SystemInfo.isWindows);
  myDriver = IdeaWin32.getInstance();
  myIdeaTotal = myJavaTotal = 0;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:IdeaWin32PerformanceTest.java

示例8: setUp

import com.intellij.openapi.util.io.win32.IdeaWin32; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
  assumeTrue(SystemInfo.isWindows);
  myDriver = IdeaWin32.getInstance();
  myIdeaTotal = myJavaTotal = 0;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:7,代码来源:IdeaWin32PerformanceTest.java


注:本文中的com.intellij.openapi.util.io.win32.IdeaWin32类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。