Merge branch 'master' of git@git.labs.intellij.net:idea/community
authorRoman Shevchenko <roman.shevchenko@jetbrains.com>
Mon, 22 Mar 2010 10:01:28 +0000 (13:01 +0300)
committerRoman Shevchenko <roman.shevchenko@jetbrains.com>
Mon, 22 Mar 2010 10:01:28 +0000 (13:01 +0300)
bin/win/IdeaWin32.dll
native/IdeaWin32/IdeaWin32.cpp
native/IdeaWin32/IdeaWin32.vcproj
platform/platform-impl/src/com/intellij/openapi/vfs/impl/win32/IdeaWin32.java
platform/platform-impl/src/com/intellij/openapi/vfs/impl/win32/Win32Kernel.java
platform/platform-impl/src/com/intellij/openapi/vfs/impl/win32/Win32LocalFileSystem.java
plugins/maven/src/test/data/plugins/org/apache/maven/plugins/maven-surefire-plugin/2.4.3/maven-surefire-plugin-2.4.3.pom

index a610544ab33ced3278608dec333228f4b774db39..fc8c95a97aeb2daa19a41ca11aec96fb9d8240e1 100644 (file)
Binary files a/bin/win/IdeaWin32.dll and b/bin/win/IdeaWin32.dll differ
index 18cb2870dad7593d4eaf28c7bee43b21da5b2b6d..11d96a8f0f6c6627e65af90c5458dfbc6d1b28cc 100644 (file)
@@ -72,6 +72,15 @@ JNIEXPORT jobject JNICALL Java_com_intellij_openapi_vfs_impl_win32_IdeaWin32_get
        return CreateFileInfo(env, &data, infoClass);
 }
 
+JNIEXPORT jboolean JNICALL Java_com_intellij_openapi_vfs_impl_win32_IdeaWin32_checkExist(JNIEnv *env, jobject method, jstring path) {
+       jint result = 0;
+    WIN32_FILE_ATTRIBUTE_DATA wfad;
+       const jchar* str = env->GetStringChars(path, 0);
+
+    if (GetFileAttributesEx((LPCWSTR)path, GetFileExInfoStandard, &wfad)) return JNI_TRUE;
+       return JNI_FALSE;
+}
+
 JNIEXPORT jobjectArray JNICALL Java_com_intellij_openapi_vfs_impl_win32_IdeaWin32_listChildren(JNIEnv *env, jobject method, jstring path)
 {
 
index 5a8310e4d77d37c71a1d0fcac3c71c2819e1893a..af41a3c0f8c910d6a1e68a57f52da14591c0dd08 100644 (file)
@@ -1,11 +1,12 @@
 <?xml version="1.0" encoding="windows-1251"?>
 <VisualStudioProject
        ProjectType="Visual C++"
-       Version="8,00"
+       Version="9.00"
        Name="IdeaWin32"
        ProjectGUID="{D1A0CC4B-C100-46E4-918A-958626AE1ACF}"
        RootNamespace="IdeaWin32"
        Keyword="Win32Proj"
+       TargetFrameworkVersion="131072"
        >
        <Platforms>
                <Platform
@@ -64,6 +65,8 @@
                                LinkIncremental="2"
                                GenerateDebugInformation="true"
                                SubSystem="2"
+                               RandomizedBaseAddress="1"
+                               DataExecutionPrevention="0"
                                TargetMachine="1"
                        />
                        <Tool
@@ -84,9 +87,6 @@
                        <Tool
                                Name="VCAppVerifierTool"
                        />
-                       <Tool
-                               Name="VCWebDeploymentTool"
-                       />
                        <Tool
                                Name="VCPostBuildEventTool"
                        />
                                SubSystem="2"
                                OptimizeReferences="2"
                                EnableCOMDATFolding="2"
+                               RandomizedBaseAddress="1"
+                               DataExecutionPrevention="0"
                                TargetMachine="1"
                        />
                        <Tool
                        <Tool
                                Name="VCAppVerifierTool"
                        />
-                       <Tool
-                               Name="VCWebDeploymentTool"
-                       />
                        <Tool
                                Name="VCPostBuildEventTool"
                        />
index b041683762de0e9e5c6b603e87521a3013aaf02b..32327f9f7f1c930ab793148aae99c08a94922310 100644 (file)
@@ -22,5 +22,7 @@ public class IdeaWin32 {
 
     public native FileInfo getInfo(String path);
 
+    public native boolean checkExist(String path);
+
     public native FileInfo[] listChildren(String path); 
 }
index 66d976010ac4cbe4e0198e3ff33bcac5d3d5acf6..73496eb287361dcddeb24584df804ed4541bc72b 100644 (file)
@@ -67,7 +67,7 @@ public class Win32Kernel {
       return true;
     }
     catch (FileNotFoundException e) {
-      return false;
+      return myKernel.checkExist(path);
     }
   }
 
index 85c336ad16dbe8d2fc560bcbef9fe39ad7701460..ad8b87d776825575252c9d0a05808fa3817e86f7 100644 (file)
@@ -56,13 +56,14 @@ public class Win32LocalFileSystem extends LocalFileSystemBase {
   };
 
   public static Win32LocalFileSystem getWin32Instance() {
+    if (!isAvailable()) throw new RuntimeException("dll is not loaded");
     Win32LocalFileSystem fileSystem = THREAD_LOCAL.get();
     fileSystem.myKernel.clearCache();
     return fileSystem;
   }
 
   private final Win32Kernel myKernel = new Win32Kernel();
-  private boolean checkMe = false;
+  public static boolean checkMe = false;
 
   private Win32LocalFileSystem() {
   }
index 1a0b4f7bd74f1fe0c5f1efea65ee95f455197c2a..330abe1e39607fccb1e6e80bceb1e6d7b81c68f1 100644 (file)
-<?xml version="1.0" encoding="UTF-8"?>\r
-<!--\r
-  ~ Licensed to the Apache Software Foundation (ASF) under one\r
-  ~ or more contributor license agreements.  See the NOTICE file\r
-  ~ distributed with this work for additional information\r
-  ~ regarding copyright ownership.  The ASF licenses this file\r
-  ~ to you under the Apache License, Version 2.0 (the\r
-  ~ "License"); you may not use this file except in compliance\r
-  ~ with the License.  You may obtain a copy of the License at\r
-  ~\r
-  ~     http://www.apache.org/licenses/LICENSE-2.0\r
-  ~\r
-  ~ Unless required by applicable law or agreed to in writing,\r
-  ~ software distributed under the License is distributed on an\r
-  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r
-  ~ KIND, either express or implied.  See the License for the\r
-  ~ specific language governing permissions and limitations\r
-  ~ under the License.\r
-  -->\r
-\r
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">\r
-  <parent>\r
-    <artifactId>surefire</artifactId>\r
-    <groupId>org.apache.maven.surefire</groupId>\r
-    <version>2.4.3</version>\r
-  </parent>\r
-  <modelVersion>4.0.0</modelVersion>\r
-  <artifactId>maven-surefire-plugin</artifactId>\r
-  <groupId>org.apache.maven.plugins</groupId>\r
-  <packaging>maven-plugin</packaging>\r
-  <name>Maven Surefire Plugin</name>\r
-  <prerequisites>\r
-    <maven>2.0.6</maven>\r
-  </prerequisites>\r
-  <mailingLists>\r
-    <!-- duplication from maven-plugins pom - temporary until they inherit properly -->\r
-    <mailingList>\r
-      <name>Maven User List</name>\r
-      <subscribe>users-subscribe@maven.apache.org</subscribe>\r
-      <unsubscribe>users-unsubscribe@maven.apache.org</unsubscribe>\r
-      <post>users@maven.apache.org</post>\r
-      <archive>http://mail-archives.apache.org/mod_mbox/maven-users</archive>\r
-      <otherArchives>\r
-        <otherArchive>http://www.mail-archive.com/users@maven.apache.org/</otherArchive>\r
-        <otherArchive>http://www.nabble.com/Maven---Users-f178.html</otherArchive>\r
-      </otherArchives>\r
-    </mailingList>\r
-    <mailingList>\r
-      <name>Maven Developer List</name>\r
-      <subscribe>dev-subscribe@maven.apache.org</subscribe>\r
-      <unsubscribe>dev-unsubscribe@maven.apache.org</unsubscribe>\r
-      <post>dev@maven.apache.org</post>\r
-      <archive>http://mail-archives.apache.org/mod_mbox/maven-dev</archive>\r
-    </mailingList>\r
-    <mailingList>\r
-      <name>Maven Commits List</name>\r
-      <subscribe>commits-subscribe@maven.apache.org</subscribe>\r
-      <unsubscribe>commits-unsubscribe@maven.apache.org</unsubscribe>\r
-      <post>commits@maven.apache.org</post>\r
-      <archive>http://mail-archives.apache.org/mod_mbox/maven-dev</archive>\r
-    </mailingList>\r
-    <!-- duplication from maven-parent pom - temporary until they inherit properly -->\r
-    <mailingList>\r
-      <name>Maven Announcements List</name>\r
-      <post>announce@maven.apache.org</post>\r
-      <subscribe>announce-subscribe@maven.apache.org</subscribe>\r
-      <unsubscribe>announce-unsubscribe@maven.apache.org</unsubscribe>\r
-      <archive>http://mail-archives.apache.org/mod_mbox/maven-announce/</archive>\r
-    </mailingList>\r
-    <mailingList>\r
-      <name>Maven Issues List</name>\r
-      <post>issues@maven.apache.org</post>\r
-      <subscribe>issues-subscribe@maven.apache.org</subscribe>\r
-      <unsubscribe>issues-unsubscribe@maven.apache.org</unsubscribe>\r
-      <archive>http://mail-archives.apache.org/mod_mbox/maven-issues/</archive>\r
-    </mailingList>\r
-    <mailingList>\r
-      <name>Maven Notifications List</name>\r
-      <post>notifications@maven.apache.org</post>\r
-      <subscribe>notifications-subscribe@maven.apache.org</subscribe>\r
-      <unsubscribe>notifications-unsubscribe@maven.apache.org</unsubscribe>\r
-      <archive>http://mail-archives.apache.org/mod_mbox/maven-notifications/</archive>\r
-    </mailingList>\r
-  </mailingLists>\r
-  <contributors>\r
-    <contributor>\r
-      <name>Joakim Erdfelt</name>\r
-      <email>joakim@erdfelt.com</email>\r
-    </contributor>\r
-  </contributors>\r
-  <dependencies>\r
-    <dependency>\r
-      <groupId>org.apache.maven</groupId>\r
-      <artifactId>maven-plugin-api</artifactId>\r
-      <version>2.0.6</version>\r
-    </dependency>\r
-    <dependency>\r
-      <groupId>org.apache.maven.surefire</groupId>\r
-      <artifactId>surefire-booter</artifactId>\r
-    </dependency>\r
-    <dependency>\r
-      <groupId>org.codehaus.plexus</groupId>\r
-      <artifactId>plexus-utils</artifactId>\r
-    </dependency>\r
-    <dependency>\r
-      <groupId>org.apache.maven</groupId>\r
-      <artifactId>maven-artifact</artifactId>\r
-      <version>2.0.6</version>\r
-    </dependency>\r
-    <dependency>\r
-      <groupId>org.apache.maven</groupId>\r
-      <artifactId>maven-project</artifactId>\r
-      <version>2.0.6</version>\r
-    </dependency>\r
-    <dependency>\r
-      <groupId>org.apache.maven</groupId>\r
-      <artifactId>maven-core</artifactId>\r
-      <version>2.0.6</version>\r
-    </dependency>\r
-    <dependency>\r
-      <groupId>org.apache.maven</groupId>\r
-      <artifactId>maven-toolchain</artifactId>\r
-      <version>1.0</version>\r
-    </dependency>\r
-</dependencies>\r
-\r
-  <build>\r
-    <plugins>\r
-      <plugin>\r
-        <artifactId>maven-site-plugin</artifactId>\r
-        <configuration>\r
-          <stagingSiteURL>scp://people.apache.org/www/maven.apache.org/plugins/${project.artifactId}-${project.version}</stagingSiteURL>\r
-        </configuration>\r
-      </plugin>\r
-    </plugins>\r
-  </build>\r
-\r
-  <profiles>\r
-    <!-- Force JDK 1.4 for this one, plugins can never be built on 1.3 -->\r
-    <profile>\r
-      <id>jdk1.3</id>\r
-      <build>\r
-        <pluginManagement>\r
-          <plugins>\r
-            <plugin>\r
-              <artifactId>maven-compiler-plugin</artifactId>\r
-              <configuration>\r
-                <fork>false</fork>\r
-                <compilerVersion>1.4</compilerVersion>\r
-              </configuration>\r
-            </plugin>\r
-          </plugins>\r
-        </pluginManagement>\r
-      </build>\r
-    </profile>\r
-    <profile>\r
-      <id>ci</id>\r
-      <activation>\r
-        <property>\r
-          <name>enableCiProfile</name>\r
-          <value>true</value>\r
-        </property>\r
-      </activation>\r
-      <build>\r
-        <plugins>\r
-          <plugin>\r
-            <artifactId>maven-docck-plugin</artifactId>\r
-            <version>1.0-beta-1</version>\r
-            <executions>\r
-              <execution>\r
-                <goals>\r
-                  <goal>check</goal>\r
-                </goals>\r
-              </execution>\r
-            </executions>\r
-          </plugin>\r
-        </plugins>\r
-      </build>\r
-    </profile>\r
-  </profiles>\r
-  <distributionManagement>\r
-    <site>\r
-      <id>apache.website</id>\r
-      <url>scp://people.apache.org/www/maven.apache.org/plugins/maven-surefire-plugin</url>\r
-    </site>\r
-  </distributionManagement>\r
-  <reporting>\r
-    <plugins>\r
-      <plugin>\r
-        <groupId>org.apache.maven.plugins</groupId>\r
-        <artifactId>maven-plugin-plugin</artifactId>\r
-      </plugin>\r
-    </plugins>\r
-  </reporting>\r
-</project>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <parent>
+    <artifactId>surefire</artifactId>
+    <groupId>org.apache.maven.surefire</groupId>
+    <version>2.4.3</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>maven-surefire-plugin</artifactId>
+  <groupId>org.apache.maven.plugins</groupId>
+  <packaging>maven-plugin</packaging>
+  <name>Maven Surefire Plugin</name>
+  <prerequisites>
+    <maven>2.0.6</maven>
+  </prerequisites>
+  <mailingLists>
+    <!-- duplication from maven-plugins pom - temporary until they inherit properly -->
+    <mailingList>
+      <name>Maven User List</name>
+      <subscribe>users-subscribe@maven.apache.org</subscribe>
+      <unsubscribe>users-unsubscribe@maven.apache.org</unsubscribe>
+      <post>users@maven.apache.org</post>
+      <archive>http://mail-archives.apache.org/mod_mbox/maven-users</archive>
+      <otherArchives>
+        <otherArchive>http://www.mail-archive.com/users@maven.apache.org/</otherArchive>
+        <otherArchive>http://www.nabble.com/Maven---Users-f178.html</otherArchive>
+      </otherArchives>
+    </mailingList>
+    <mailingList>
+      <name>Maven Developer List</name>
+      <subscribe>dev-subscribe@maven.apache.org</subscribe>
+      <unsubscribe>dev-unsubscribe@maven.apache.org</unsubscribe>
+      <post>dev@maven.apache.org</post>
+      <archive>http://mail-archives.apache.org/mod_mbox/maven-dev</archive>
+    </mailingList>
+    <mailingList>
+      <name>Maven Commits List</name>
+      <subscribe>commits-subscribe@maven.apache.org</subscribe>
+      <unsubscribe>commits-unsubscribe@maven.apache.org</unsubscribe>
+      <post>commits@maven.apache.org</post>
+      <archive>http://mail-archives.apache.org/mod_mbox/maven-dev</archive>
+    </mailingList>
+    <!-- duplication from maven-parent pom - temporary until they inherit properly -->
+    <mailingList>
+      <name>Maven Announcements List</name>
+      <post>announce@maven.apache.org</post>
+      <subscribe>announce-subscribe@maven.apache.org</subscribe>
+      <unsubscribe>announce-unsubscribe@maven.apache.org</unsubscribe>
+      <archive>http://mail-archives.apache.org/mod_mbox/maven-announce/</archive>
+    </mailingList>
+    <mailingList>
+      <name>Maven Issues List</name>
+      <post>issues@maven.apache.org</post>
+      <subscribe>issues-subscribe@maven.apache.org</subscribe>
+      <unsubscribe>issues-unsubscribe@maven.apache.org</unsubscribe>
+      <archive>http://mail-archives.apache.org/mod_mbox/maven-issues/</archive>
+    </mailingList>
+    <mailingList>
+      <name>Maven Notifications List</name>
+      <post>notifications@maven.apache.org</post>
+      <subscribe>notifications-subscribe@maven.apache.org</subscribe>
+      <unsubscribe>notifications-unsubscribe@maven.apache.org</unsubscribe>
+      <archive>http://mail-archives.apache.org/mod_mbox/maven-notifications/</archive>
+    </mailingList>
+  </mailingLists>
+  <contributors>
+    <contributor>
+      <name>Joakim Erdfelt</name>
+      <email>joakim@erdfelt.com</email>
+    </contributor>
+  </contributors>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-plugin-api</artifactId>
+      <version>2.0.6</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.surefire</groupId>
+      <artifactId>surefire-booter</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-utils</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-artifact</artifactId>
+      <version>2.0.6</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-project</artifactId>
+      <version>2.0.6</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-core</artifactId>
+      <version>2.0.6</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-toolchain</artifactId>
+      <version>1.0</version>
+    </dependency>
+</dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-site-plugin</artifactId>
+        <configuration>
+          <stagingSiteURL>scp://people.apache.org/www/maven.apache.org/plugins/${project.artifactId}-${project.version}</stagingSiteURL>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+  <profiles>
+    <!-- Force JDK 1.4 for this one, plugins can never be built on 1.3 -->
+    <profile>
+      <id>jdk1.3</id>
+      <build>
+        <pluginManagement>
+          <plugins>
+            <plugin>
+              <artifactId>maven-compiler-plugin</artifactId>
+              <configuration>
+                <fork>false</fork>
+                <compilerVersion>1.4</compilerVersion>
+              </configuration>
+            </plugin>
+          </plugins>
+        </pluginManagement>
+      </build>
+    </profile>
+    <profile>
+      <id>ci</id>
+      <activation>
+        <property>
+          <name>enableCiProfile</name>
+          <value>true</value>
+        </property>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <artifactId>maven-docck-plugin</artifactId>
+            <version>1.0-beta-1</version>
+            <executions>
+              <execution>
+                <goals>
+                  <goal>check</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
+  <distributionManagement>
+    <site>
+      <id>apache.website</id>
+      <url>scp://people.apache.org/www/maven.apache.org/plugins/maven-surefire-plugin</url>
+    </site>
+  </distributionManagement>
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-plugin-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </reporting>
+</project>