From aad0948fadc7d78ea23fbe190f156646991ddad2 Mon Sep 17 00:00:00 2001 From: peter Date: Fri, 29 Jun 2012 13:09:50 +0200 Subject: [PATCH 1/4] Class Name Completion --- .../platform-resources-en/src/messages/ActionsBundle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/platform-resources-en/src/messages/ActionsBundle.properties b/platform/platform-resources-en/src/messages/ActionsBundle.properties index ec400d719c25..2595bf5331e5 100644 --- a/platform/platform-resources-en/src/messages/ActionsBundle.properties +++ b/platform/platform-resources-en/src/messages/ActionsBundle.properties @@ -458,7 +458,7 @@ action.HippieBackwardCompletion.text=Cyclic _Expand Word (Backward) action.HippieBackwardCompletion.description=Cyclic Expand word (Backward) action.SmartTypeCompletion.text=_SmartType action.SmartTypeCompletion.description=Complete code basing on expected type -action.ClassNameCompletion.text=Class _Name +action.ClassNameCompletion.text=Class _Name Completion action.ClassNameCompletion.description=Complete class name and add import for it action.InsertLiveTemplate.text=Insert Live _Template... action.InsertLiveTemplate.description=Show popup list of live templates starting with the specified prefix From e5400ad5e279a325cf1fc691bf36e489ef192291 Mon Sep 17 00:00:00 2001 From: peter Date: Fri, 29 Jun 2012 13:16:17 +0200 Subject: [PATCH 2/4] fix PathMacroManagerTest on windows? --- .../openapi/components/impl/PathMacroManagerTest.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/platform/platform-tests/testSrc/com/intellij/openapi/components/impl/PathMacroManagerTest.java b/platform/platform-tests/testSrc/com/intellij/openapi/components/impl/PathMacroManagerTest.java index ab25313ba006..cbf56fe0f1fe 100644 --- a/platform/platform-tests/testSrc/com/intellij/openapi/components/impl/PathMacroManagerTest.java +++ b/platform/platform-tests/testSrc/com/intellij/openapi/components/impl/PathMacroManagerTest.java @@ -27,7 +27,7 @@ import com.intellij.openapi.application.ex.ApplicationEx; import com.intellij.openapi.module.Module; import com.intellij.openapi.project.ex.ProjectEx; import com.intellij.openapi.util.Disposer; -import com.intellij.openapi.util.SystemInfo; +import com.intellij.openapi.util.io.FileUtil; import com.intellij.openapi.util.text.StringUtil; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.openapi.vfs.VirtualFileManager; @@ -55,17 +55,15 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import static org.hamcrest.core.Is.is; import static org.junit.Assert.assertEquals; -import static org.junit.Assume.assumeThat; /** * @author mike */ @RunWith(JMock.class) public class PathMacroManagerTest { - private static final String APP_HOME = PathManager.getHomePath(); - private static final String USER_HOME = StringUtil.trimEnd(SystemProperties.getUserHome(), "/"); + private static final String APP_HOME = FileUtil.toSystemIndependentName(PathManager.getHomePath()); + private static final String USER_HOME = FileUtil.toSystemIndependentName(StringUtil.trimEnd(SystemProperties.getUserHome(), "/")); private Module myModule; private ProjectEx myProject; From 215035f0ea9494b89d10908c87196609c6774ba4 Mon Sep 17 00:00:00 2001 From: Eugene Zhuravlev Date: Fri, 29 Jun 2012 14:17:20 +0200 Subject: [PATCH 3/4] larger thread stack by default for build process --- platform/platform-resources-en/src/misc/registry.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/platform-resources-en/src/misc/registry.properties b/platform/platform-resources-en/src/misc/registry.properties index 2199c875a91d..6a7fa1932390 100644 --- a/platform/platform-resources-en/src/misc/registry.properties +++ b/platform/platform-resources-en/src/misc/registry.properties @@ -142,8 +142,8 @@ compiler.process.heap.size.description=Heap size value in MB for the build proce compiler.process.32bit.vm.on.mac=true compiler.process.32bit.vm.on.mac.description=Force -d32 VM option on Mac (recommended for faster startup and lower memory footprint) -compiler.process.vm.options= -compiler.process.vm.options.description=Additional options for compile server's VM +compiler.process.vm.options=-Xss2048k +compiler.process.vm.options.description=Additional options for the build process' VM compiler.process.use.memory.temp.cache=true compiler.process.use.memory.temp.cache.description=Store temporary data in memory for faster compilation; requires larger server heap size From 9ad9275b9a94d40369c2f3ac12f4a78d1e72f488 Mon Sep 17 00:00:00 2001 From: Eugene Zhuravlev Date: Fri, 29 Jun 2012 14:19:01 +0200 Subject: [PATCH 4/4] aux log parser --- .../org/jetbrains/ether/LogParser.java | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 jps/jps-builders/testSrc/org/jetbrains/ether/LogParser.java diff --git a/jps/jps-builders/testSrc/org/jetbrains/ether/LogParser.java b/jps/jps-builders/testSrc/org/jetbrains/ether/LogParser.java new file mode 100644 index 000000000000..819d80406b66 --- /dev/null +++ b/jps/jps-builders/testSrc/org/jetbrains/ether/LogParser.java @@ -0,0 +1,59 @@ +package org.jetbrains.ether; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileReader; +import java.io.IOException; + +/** + * @author Eugene Zhuravlev + * Date: 6/29/12 + */ +public class LogParser { + + public static void main(String[] args) throws IOException { + final String logPath = args[0]; + + long totalTime = 0L; + final BufferedReader reader = new BufferedReader(new FileReader(new File(logPath))); + try { + String line = reader.readLine(); + while (line != null) { + if (line.contains("incremental.java.JavaBuilder - Compiling")) { + final long startTime = getTime(line); + final String nextLine = reader.readLine(); + if (nextLine != null && nextLine.contains("- Dependency analysis found")) { + final long endTime = getTime(nextLine); + totalTime += (endTime - startTime); + } + } + line = reader.readLine(); + } + } + finally { + reader.close(); + } + + long millis = totalTime % 1000; + long seconds = totalTime / 1000; + long minutes = seconds / 60; + seconds = seconds % 60; + + System.out.println("Total time spent compiling java " + minutes + " min " + seconds + " sec " + millis + " ms"); + } + + + private static final int HOURS_START = 11; + private static final int MINUTES_START = HOURS_START + 3; + private static final int SECONDS_START = MINUTES_START + 3; + private static final int MILLIS_START = SECONDS_START + 3; + + private static long getTime(String line) { + final int hours = Integer.parseInt(line.substring(HOURS_START, HOURS_START + 2)); + final int minutes = Integer.parseInt(line.substring(MINUTES_START, MINUTES_START + 2)); + final int seconds = Integer.parseInt(line.substring(SECONDS_START, SECONDS_START + 2)); + final int millis = Integer.parseInt(line.substring(MILLIS_START, MILLIS_START + 3)); + return millis + seconds * 1000 + minutes * 60000 + hours * 3600000; + } + +}