diff --git a/java/compiler/impl/src/com/intellij/compiler/CompilerSettingsUsageCollector.java b/java/compiler/impl/src/com/intellij/compiler/CompilerSettingsUsageCollector.java new file mode 100644 index 000000000000..06bf055246c3 --- /dev/null +++ b/java/compiler/impl/src/com/intellij/compiler/CompilerSettingsUsageCollector.java @@ -0,0 +1,62 @@ +/* + * Copyright 2000-2013 JetBrains s.r.o. + * + * Licensed 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. + */ +package com.intellij.compiler; + +import com.intellij.internal.statistic.CollectUsagesException; +import com.intellij.internal.statistic.UsagesCollector; +import com.intellij.internal.statistic.beans.GroupDescriptor; +import com.intellij.internal.statistic.beans.UsageDescriptor; +import com.intellij.openapi.project.Project; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.Collections; +import java.util.HashSet; +import java.util.Set; + +/** + * @author Eugene Zhuravlev + * Date: 4/11/13 + */ +public class CompilerSettingsUsageCollector extends UsagesCollector{ + public static final String GROUP_ID = "compiler"; + + @NotNull + @Override + public Set getUsages(@Nullable Project project) throws CollectUsagesException { + final CompilerWorkspaceConfiguration wsConfig = CompilerWorkspaceConfiguration.getInstance(project); + if (!wsConfig.useOutOfProcessBuild()) { + return Collections.emptySet(); + } + + final Set result = new HashSet(); + result.add(new UsageDescriptor("external_build", 1)); + if (wsConfig.MAKE_PROJECT_ON_SAVE) { + result.add(new UsageDescriptor("auto_make", 1)); + } + if (wsConfig.PARALLEL_COMPILATION) { + result.add(new UsageDescriptor("compile_parallel", 1)); + } + + return result; + } + + @NotNull + @Override + public GroupDescriptor getGroupId() { + return GroupDescriptor.create(GROUP_ID); + } +} diff --git a/java/compiler/impl/src/com/intellij/compiler/server/impl/CompileServerClasspathManager.java b/java/compiler/impl/src/com/intellij/compiler/server/impl/CompileServerClasspathManager.java index 91c001d7517a..e1474b9f770f 100644 --- a/java/compiler/impl/src/com/intellij/compiler/server/impl/CompileServerClasspathManager.java +++ b/java/compiler/impl/src/com/intellij/compiler/server/impl/CompileServerClasspathManager.java @@ -85,7 +85,11 @@ public class CompileServerClasspathManager { else { //development mode: add directory out/classes/production/ to classpath, assuming that jar-name is equal to module name final String moduleName = FileUtil.getNameWithoutExtension(PathUtil.getFileName(relativePath)); - final File dir = new File(baseFile.getParentFile(), moduleName); + File baseOutputDir = baseFile.getParentFile(); + if (baseOutputDir.getName().equals("test")) { + baseOutputDir = new File(baseOutputDir.getParentFile(), "production"); + } + final File dir = new File(baseOutputDir, moduleName); if (dir.exists()) { classpath.add(dir.getPath()); } @@ -98,12 +102,13 @@ public class CompileServerClasspathManager { classpath.add(libraryFile.getPath()); } else { - LOG.error("Cannot add plugin '" + plugin.getName() + "' to external compiler classpath: " + + LOG.error("Cannot add " + relativePath + " from plugin '" + plugin.getName() + "' to external compiler classpath: " + "library " + libraryFile.getAbsolutePath() + " not found"); } } else { - LOG.error("Cannot add plugin '" + plugin.getName() + "' to external compiler classpath: home directory of plugin not found"); + LOG.error("Cannot add " + relativePath + " from plugin '" + plugin.getName() + + "' to external compiler classpath: home directory of plugin not found"); } } } diff --git a/platform/core-api/src/com/intellij/ide/IdeBundle.java b/platform/core-api/src/com/intellij/ide/IdeBundle.java index d604862e8a64..92d43beb579a 100644 --- a/platform/core-api/src/com/intellij/ide/IdeBundle.java +++ b/platform/core-api/src/com/intellij/ide/IdeBundle.java @@ -17,6 +17,7 @@ package com.intellij.ide; import com.intellij.CommonBundle; +import com.intellij.openapi.util.SystemInfo; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.PropertyKey; @@ -39,6 +40,22 @@ public class IdeBundle { return CommonBundle.message(getBundle(), key, params); } + public static String settingsTitle() { + return SystemInfo.isMac ? message("title.settings.mac") : message("title.settings"); + } + + public static String settingsAction() { + return SystemInfo.isMac ? message("action.settings.mac") : message("action.settings"); + } + + public static String settingsActionDescription() { + return SystemInfo.isMac ? message("action.settings.description.mac") : message("action.settings.description"); + } + + public static String settingsActionPath() { + return SystemInfo.isMac ? message("action.settings.path.mac") : message("action.settings.path"); + } + private static ResourceBundle getBundle() { ResourceBundle bundle = null; if (ourBundle != null) bundle = ourBundle.get(); diff --git a/platform/lang-impl/src/com/intellij/application/options/InitialConfigurationDialog.form b/platform/lang-impl/src/com/intellij/application/options/InitialConfigurationDialog.form index d1350397f7fd..72ce18ca8a96 100644 --- a/platform/lang-impl/src/com/intellij/application/options/InitialConfigurationDialog.form +++ b/platform/lang-impl/src/com/intellij/application/options/InitialConfigurationDialog.form @@ -131,13 +131,13 @@ - + - + diff --git a/platform/lang-impl/src/com/intellij/application/options/InitialConfigurationDialog.java b/platform/lang-impl/src/com/intellij/application/options/InitialConfigurationDialog.java index 896f3d6b75ab..21742ade3ed1 100644 --- a/platform/lang-impl/src/com/intellij/application/options/InitialConfigurationDialog.java +++ b/platform/lang-impl/src/com/intellij/application/options/InitialConfigurationDialog.java @@ -20,6 +20,7 @@ import com.intellij.application.options.colors.NewColorAndFontPanel; import com.intellij.application.options.colors.SimpleEditorPreview; import com.intellij.icons.AllIcons; import com.intellij.ide.DataManager; +import com.intellij.ide.IdeBundle; import com.intellij.ide.actions.CreateDesktopEntryAction; import com.intellij.ide.actions.CreateLauncherScriptAction; import com.intellij.ide.todo.TodoConfiguration; @@ -76,6 +77,7 @@ public class InitialConfigurationDialog extends DialogWrapper { private JCheckBox myGlobalEntryCheckBox; private JPanel myCreateEntryPanel; private ComboBox myAppearanceComboBox; + private JLabel myPreferencesLabel; private String myColorSettingsPage; private SimpleEditorPreview myPreviewEditor; private ColorAndFontOptions myPreviewOptions; @@ -177,6 +179,8 @@ public class InitialConfigurationDialog extends DialogWrapper { myGlobalEntryCheckBox.setSelected(!PathManager.getHomePath().startsWith("/home")); } + myPreferencesLabel.setText("You can use "+ IdeBundle.settingsActionPath() + " to configure any of these settings later."); + Disposer.register(myDisposable, new Disposable() { @Override public void dispose() { diff --git a/platform/platform-api/src/com/intellij/execution/configurations/ParametersList.java b/platform/platform-api/src/com/intellij/execution/configurations/ParametersList.java index b53801f7f6d1..87ad2361c067 100644 --- a/platform/platform-api/src/com/intellij/execution/configurations/ParametersList.java +++ b/platform/platform-api/src/com/intellij/execution/configurations/ParametersList.java @@ -107,9 +107,8 @@ public class ParametersList implements Cloneable { } public void prependAll(@NonNls final String... parameter) { - for (int i = parameter.length - 1; i >= 0; i--) { - addAt(0, parameter[i]); - } + addAll(parameter); + Collections.rotate(myParameters, parameter.length); } public void addParametersString(final String parameters) { @@ -226,11 +225,14 @@ public class ParametersList implements Cloneable { } public void addAll(final String... parameters) { - ContainerUtil.addAll(myParameters, parameters); + addAll(Arrays.asList(parameters)); } public void addAll(final List parameters) { - myParameters.addAll(parameters); + // Don't use myParameters.addAll(parameters) , it does not call expandMacros(parameter) + for (String parameter : parameters) { + add(parameter); + } } @Override diff --git a/platform/platform-api/src/com/intellij/ide/BrowserUtil.java b/platform/platform-api/src/com/intellij/ide/BrowserUtil.java index b058fd0f8a59..8d16b045ea7e 100644 --- a/platform/platform-api/src/com/intellij/ide/BrowserUtil.java +++ b/platform/platform-api/src/com/intellij/ide/BrowserUtil.java @@ -51,8 +51,10 @@ import java.lang.reflect.InvocationTargetException; import java.net.MalformedURLException; import java.net.URI; import java.net.URL; -import java.util.*; +import java.util.Arrays; +import java.util.HashSet; import java.util.List; +import java.util.Set; import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.zip.ZipEntry; @@ -178,7 +180,8 @@ public class BrowserUtil { String browserPath = getGeneralSettingsInstance().getBrowserPath(); if (StringUtil.isEmptyOrSpaces(browserPath)) { - showErrorMessage(IdeBundle.message("error.please.specify.path.to.web.browser"), IdeBundle.message("title.browser.not.found")); + showErrorMessage(IdeBundle.message("error.please.specify.path.to.web.browser", IdeBundle.settingsActionPath()), + IdeBundle.message("title.browser.not.found")); return; } diff --git a/platform/platform-impl/src/com/intellij/ide/actions/ShowSettingsAction.java b/platform/platform-impl/src/com/intellij/ide/actions/ShowSettingsAction.java index 30459584327b..53ed30f2249e 100644 --- a/platform/platform-impl/src/com/intellij/ide/actions/ShowSettingsAction.java +++ b/platform/platform-impl/src/com/intellij/ide/actions/ShowSettingsAction.java @@ -15,6 +15,8 @@ */ package com.intellij.ide.actions; +import com.intellij.icons.AllIcons; +import com.intellij.ide.IdeBundle; import com.intellij.openapi.actionSystem.ActionPlaces; import com.intellij.openapi.actionSystem.AnAction; import com.intellij.openapi.actionSystem.AnActionEvent; @@ -31,12 +33,19 @@ import com.intellij.openapi.util.SystemInfo; import javax.swing.*; public class ShowSettingsAction extends AnAction implements DumbAware { + public ShowSettingsAction() { + super(IdeBundle.settingsAction(), IdeBundle.settingsActionDescription(), AllIcons.General.Settings); + } + @Override public void update(AnActionEvent e) { if (SystemInfo.isMac && e.getPlace().equals(ActionPlaces.MAIN_MENU)) { // It's called from Preferences in App menu. e.getPresentation().setVisible(false); } + if (e.getPlace().equals(ActionPlaces.WELCOME_SCREEN)) { + e.getPresentation().setText(IdeBundle.settingsTitle()); + } } public void actionPerformed(AnActionEvent e) { diff --git a/platform/platform-impl/src/com/intellij/openapi/options/newEditor/OptionsEditorDialog.java b/platform/platform-impl/src/com/intellij/openapi/options/newEditor/OptionsEditorDialog.java index f814ab2edd1a..64dbe628309a 100644 --- a/platform/platform-impl/src/com/intellij/openapi/options/newEditor/OptionsEditorDialog.java +++ b/platform/platform-impl/src/com/intellij/openapi/options/newEditor/OptionsEditorDialog.java @@ -16,6 +16,7 @@ package com.intellij.openapi.options.newEditor; import com.intellij.CommonBundle; +import com.intellij.ide.IdeBundle; import com.intellij.ide.ui.search.SearchUtil; import com.intellij.ide.util.PropertiesComponent; import com.intellij.openapi.actionSystem.DataProvider; @@ -67,7 +68,7 @@ public class OptionsEditorDialog extends DialogWrapper implements DataProvider{ myGroups = groups; myPreselected = preselected; - setTitle("Settings"); + setTitle(IdeBundle.settingsTitle()); init(); } diff --git a/platform/platform-resources-en/src/messages/ActionsBundle.properties b/platform/platform-resources-en/src/messages/ActionsBundle.properties index f00453bde6fc..91e1c3b170c2 100644 --- a/platform/platform-resources-en/src/messages/ActionsBundle.properties +++ b/platform/platform-resources-en/src/messages/ActionsBundle.properties @@ -247,8 +247,6 @@ group.reopen.mac.text=Open _Recent group.$LRU.description=List of recently opened projects action.CloseProject.text=Close Pro_ject action.CloseProject.description=Close current project -action.ShowSettings.text=Se_ttings... -action.ShowSettings.description=Configure application settings action.ShowProjectStructureSettings.text=Project Structure... action.ShowProjectStructureSettings.description=Configure project structure action.TemplateProjectProperties.text=Def_ault Settings... @@ -1162,8 +1160,6 @@ action.WelcomeScreen.CreateNewProject.description=Start the \"New Project\" Wiza action.WelcomeScreen.ImportProject.text=Import Project action.WelcomeScreen.ImportProject.description=Create {0} project structure for directory with existing sources or convert existing project model. action.WelcomeScreen.JetBrainsTV.IDEA.text=JetBrains TV -action.WelcomeScreen.Settings.text=Settings -action.WelcomeScreen.Settings.description=Edit Settings action.WelcomeScreen.Plugins.text=Plugins action.WelcomeScreen.Plugins.description=Manage installed plugins and download new ones from repository action.WelcomeScreen.Configure.Import.text=Import Settings diff --git a/platform/platform-resources-en/src/messages/IdeBundle.properties b/platform/platform-resources-en/src/messages/IdeBundle.properties index 27ae01421fe9..e0c4999c79f8 100644 --- a/platform/platform-resources-en/src/messages/IdeBundle.properties +++ b/platform/platform-resources-en/src/messages/IdeBundle.properties @@ -1,7 +1,16 @@ +title.settings=Settings +title.settings.mac=Preferences +action.settings=Se_ttings... +action.settings.mac=Preferences... +action.settings.description=Edit application settings +action.settings.description.mac=Edit application preferences +action.settings.path=File | Settings +action.settings.path.mac=Preferences + title.cannot.start.browser=Cannot start browser error.malformed.url=Malformed url: {0} error.cannot.start.browser=Cannot start browser: {0} -error.please.specify.path.to.web.browser=Please specify a path to web browser in File | Settings | Web Browsers +error.please.specify.path.to.web.browser=Please specify a path to web browser in {0} | Web Browsers title.browser.not.found=Browser Not Found title.browser.path.not.found=Browser Path Not Found action.sort.alphabetically=Sort Alphabetically diff --git a/platform/platform-resources/src/idea/PlatformActions.xml b/platform/platform-resources/src/idea/PlatformActions.xml index 57ce347c1314..564effde7c92 100644 --- a/platform/platform-resources/src/idea/PlatformActions.xml +++ b/platform/platform-resources/src/idea/PlatformActions.xml @@ -153,7 +153,7 @@ - + diff --git a/plugins/google-app-engine/testSource/META-INF/plugin.xml b/plugins/google-app-engine/testSource/META-INF/plugin.xml index 2edf3e7f982d..01deb890064a 100644 --- a/plugins/google-app-engine/testSource/META-INF/plugin.xml +++ b/plugins/google-app-engine/testSource/META-INF/plugin.xml @@ -4,5 +4,5 @@ This fake plugin descriptor is used to run tests - + diff --git a/plugins/maven/src/main/java/org/jetbrains/idea/maven/execution/MavenJUnitPatcher.java b/plugins/maven/src/main/java/org/jetbrains/idea/maven/execution/MavenJUnitPatcher.java index 26255aba8665..c00e6daa4c37 100644 --- a/plugins/maven/src/main/java/org/jetbrains/idea/maven/execution/MavenJUnitPatcher.java +++ b/plugins/maven/src/main/java/org/jetbrains/idea/maven/execution/MavenJUnitPatcher.java @@ -60,12 +60,16 @@ public class MavenJUnitPatcher extends JUnitPatcher { Element systemPropertyVariables = config.getChild("systemPropertyVariables"); if (systemPropertyVariables != null) { - for (Element element : (List)systemPropertyVariables.getChildren()) { - String propertyName = element.getName(); - String value = element.getValue(); + List propertiesDefinitions = (List)systemPropertyVariables.getChildren(); - javaParameters.getVMParametersList().addProperty(propertyName, value); + String[] params = new String[propertiesDefinitions.size()]; + + int i = 0; + for (Element element : propertiesDefinitions) { + params[i++] = "-D" + element.getName() + "=" + element.getValue(); } + + javaParameters.getVMParametersList().prependAll(params); } Element environmentVariables = config.getChild("environmentVariables"); diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/SvnBundle.properties b/plugins/svn4idea/src/org/jetbrains/idea/svn/SvnBundle.properties index b86ae6f4b00e..45fe521b35e9 100644 --- a/plugins/svn4idea/src/org/jetbrains/idea/svn/SvnBundle.properties +++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/SvnBundle.properties @@ -218,7 +218,7 @@ radio.configure.change.auto.15format=1.&5 format radio.configure.change.auto.16format=1.&6 format radio.configure.change.auto.17format=1.&7 format -label.where.svn.format.settings.text=To change above setting later, visit 'File | Settings | Version Control' +label.where.svn.format.settings.text=To change above setting later, visit '{0} | Version Control' label.where.svn.format.can.be.changed.text=''Version Control | Subversion | {0}'' dialog.upgrade.wcopy.format.title=Subversion Working Copy Format diff --git a/resources/src/idea/RichPlatformPlugin.xml b/resources/src/idea/RichPlatformPlugin.xml index 1d37d6ffb460..d08976ae0770 100644 --- a/resources/src/idea/RichPlatformPlugin.xml +++ b/resources/src/idea/RichPlatformPlugin.xml @@ -327,6 +327,7 @@ +