diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/ArtifactEditorImpl.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/ArtifactEditorImpl.java index 717c7904ba09..8fe693c6460c 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/ArtifactEditorImpl.java +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/ArtifactEditorImpl.java @@ -63,6 +63,7 @@ import org.jetbrains.annotations.Nullable; import javax.swing.*; import javax.swing.border.CompoundBorder; import javax.swing.border.EmptyBorder; +import javax.swing.border.LineBorder; import javax.swing.event.HyperlinkEvent; import java.awt.*; import java.awt.event.ActionEvent; @@ -206,6 +207,8 @@ public class ArtifactEditorImpl implements ArtifactEditorEx { JPanel treePanel = myLayoutTreeComponent.getTreePanel(); if (UIUtil.isUnderDarcula()) { treePanel.setBorder(new EmptyBorder(3, 0, 0, 0)); + } else { + treePanel.setBorder(new LineBorder(UIUtil.getBorderColor())); } leftPanel.add(treePanel, BorderLayout.CENTER); if (UIUtil.isUnderDarcula()) { @@ -219,8 +222,9 @@ public class ArtifactEditorImpl implements ArtifactEditorEx { final JPanel rightPanel = new JPanel(new BorderLayout()); final JPanel rightTopPanel = new JPanel(new BorderLayout()); - final JPanel labelPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 5, 0)); - labelPanel.add(new JLabel("Available Elements")); + final JPanel labelPanel = new JPanel(); + labelPanel.setLayout(new BoxLayout(labelPanel, BoxLayout.X_AXIS)); + labelPanel.add(new JLabel("Available Elements ")); final HyperlinkLabel link = new HyperlinkLabel(""); link.setIcon(AllIcons.General.Help); link.setUseIconAsLink(true); @@ -235,12 +239,16 @@ public class ArtifactEditorImpl implements ArtifactEditorEx { } }); labelPanel.add(link); - rightTopPanel.add(labelPanel, BorderLayout.SOUTH); + rightTopPanel.add(labelPanel, BorderLayout.CENTER); rightPanel.add(rightTopPanel, BorderLayout.NORTH); JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(mySourceItemsTree, UIUtil.isUnderDarcula()); JPanel scrollPaneWrap = new JPanel(new BorderLayout()); scrollPaneWrap.add(scrollPane, BorderLayout.CENTER); - scrollPaneWrap.setBorder(new EmptyBorder(3, 0, 0, 0)); + if (UIUtil.isUnderDarcula()) { + scrollPaneWrap.setBorder(new EmptyBorder(3, 0, 0, 0)); + } else { + scrollPaneWrap.setBorder(new LineBorder(UIUtil.getBorderColor())); + } rightPanel.add(scrollPaneWrap, BorderLayout.CENTER); if (UIUtil.isUnderDarcula()) { diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/LayoutTreeComponent.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/LayoutTreeComponent.java index 1575a273e46f..d778e881b0a0 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/LayoutTreeComponent.java +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/LayoutTreeComponent.java @@ -132,9 +132,7 @@ public class LayoutTreeComponent implements DnDTarget, Disposable { emptyPanel.setPreferredSize(new Dimension(0, 0)); myPropertiesPanelWrapper = new JPanel(new CardLayout()); - if (UIUtil.isUnderDarcula()) { - myPropertiesPanel.setBorder(new CustomLineBorder(UIUtil.getBorderColor(), 1, 0, 0, 0)); - } + myPropertiesPanel.setBorder(new CustomLineBorder(UIUtil.getBorderColor(), 1, 0, 0, 0)); myPropertiesPanelWrapper.add(EMPTY_CARD, emptyPanel); myPropertiesPanelWrapper.add(PROPERTIES_CARD, myPropertiesPanel); } @@ -614,7 +612,7 @@ public class LayoutTreeComponent implements DnDTarget, Disposable { myCurrentPanel = element.getType().createElementPropertiesPanel(myElement, myContext); myPropertiesPanel.removeAll(); if (myCurrentPanel != null) { - myPropertiesPanel.add(BorderLayout.CENTER, ScrollPaneFactory.createScrollPane(myCurrentPanel.createComponent(), UIUtil.isUnderDarcula())); + myPropertiesPanel.add(BorderLayout.CENTER, ScrollPaneFactory.createScrollPane(myCurrentPanel.createComponent(), true)); myCurrentPanel.reset(); myPropertiesPanel.revalidate(); } diff --git a/platform/lang-impl/src/com/intellij/execution/console/ConsoleFoldingConfigurable.java b/platform/lang-impl/src/com/intellij/execution/console/ConsoleFoldingConfigurable.java index 71773a6cde8f..471082275eea 100644 --- a/platform/lang-impl/src/com/intellij/execution/console/ConsoleFoldingConfigurable.java +++ b/platform/lang-impl/src/com/intellij/execution/console/ConsoleFoldingConfigurable.java @@ -3,8 +3,10 @@ package com.intellij.execution.console; import com.intellij.openapi.options.Configurable; import com.intellij.openapi.options.ConfigurationException; import com.intellij.openapi.options.SearchableConfigurable; +import com.intellij.openapi.ui.InputValidatorEx; import com.intellij.openapi.ui.Messages; import com.intellij.openapi.ui.Splitter; +import com.intellij.openapi.util.text.StringUtil; import com.intellij.ui.AddEditDeleteListPanel; import org.jetbrains.annotations.Nls; import org.jetbrains.annotations.NotNull; @@ -30,7 +32,8 @@ public class ConsoleFoldingConfigurable implements SearchableConfigurable, Confi myMainComponent = new JPanel(new BorderLayout()); Splitter splitter = new Splitter(true); myMainComponent.add(splitter); - myPositivePanel = new MyAddDeleteListPanel("Fold console lines that contain", "Enter a substring of a console line you'd like to see folded:"); + myPositivePanel = + new MyAddDeleteListPanel("Fold console lines that contain", "Enter a substring of a console line you'd like to see folded:"); myNegativePanel = new MyAddDeleteListPanel("Exceptions", "Enter a substring of a console line you don't want to fold:"); splitter.setFirstComponent(myPositivePanel); splitter.setSecondComponent(myNegativePanel); @@ -101,7 +104,26 @@ public class ConsoleFoldingConfigurable implements SearchableConfigurable, Confi @Nullable private String showEditDialog(final String initialValue) { - return Messages.showInputDialog(this, myQuery, "Folding pattern", Messages.getQuestionIcon(), initialValue, null); + return Messages.showInputDialog(this, myQuery, "Folding pattern", Messages.getQuestionIcon(), initialValue, new InputValidatorEx() { + @Override + public boolean checkInput(String inputString) { + return !StringUtil.isEmpty(inputString); + } + + @Override + public boolean canClose(String inputString) { + return !StringUtil.isEmpty(inputString); + } + + @Nullable + @Override + public String getErrorText(String inputString) { + if (!checkInput(inputString)) { + return "Console folding rule string cannot be empty"; + } + return null; + } + }); } void resetFrom(List patterns) { diff --git a/platform/lang-impl/src/com/intellij/execution/console/ConsoleFoldingSettings.java b/platform/lang-impl/src/com/intellij/execution/console/ConsoleFoldingSettings.java index 20f96b7af132..ca986f020cdc 100644 --- a/platform/lang-impl/src/com/intellij/execution/console/ConsoleFoldingSettings.java +++ b/platform/lang-impl/src/com/intellij/execution/console/ConsoleFoldingSettings.java @@ -15,13 +15,14 @@ */ package com.intellij.execution.console; +import com.google.common.base.Predicate; +import com.google.common.collect.Collections2; import com.intellij.openapi.components.*; +import com.intellij.openapi.util.text.StringUtil; import com.intellij.util.containers.ContainerUtil; +import org.jetbrains.annotations.Nullable; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Set; +import java.util.*; /** * @author peter @@ -89,13 +90,19 @@ public class ConsoleFoldingSettings implements PersistentStateComponent filterEmptyStringsFromCollection(Collection collection) { + return Collections2.filter(collection, new Predicate() { + @Override + public boolean apply(@Nullable String input) { + return !StringUtil.isEmpty(input); + } + }); + } + public void loadState(MyBean state) { myPositivePatterns.clear(); myNegativePatterns.clear(); - myPositivePatterns.addAll(state.addedPositive); - myNegativePatterns.addAll(state.addedNegative); - Set removedPositive = new HashSet(state.removedPositive); Set removedNegative = new HashSet(state.removedNegative); @@ -104,6 +111,10 @@ public class ConsoleFoldingSettings implements PersistentStateComponent extends DialogWrapper implemen ExpandAllAction expandAllAction = new ExpandAllAction(); expandAllAction.registerCustomShortcutSet( - new CustomShortcutSet( - KeyStroke.getKeyStroke(KeyEvent.VK_EQUALS, SystemInfo.isMac ? InputEvent.META_MASK : InputEvent.CTRL_MASK)), + new CustomShortcutSet(KeymapManager.getInstance().getActiveKeymap().getShortcuts(IdeActions.ACTION_EXPAND_ALL)), myTree); group.add(expandAllAction); CollapseAllAction collapseAllAction = new CollapseAllAction(); collapseAllAction.registerCustomShortcutSet( - new CustomShortcutSet( - KeyStroke.getKeyStroke(KeyEvent.VK_MINUS, SystemInfo.isMac ? InputEvent.META_MASK : InputEvent.CTRL_MASK)), + new CustomShortcutSet(KeymapManager.getInstance().getActiveKeymap().getShortcuts(IdeActions.ACTION_COLLAPSE_ALL)), myTree); group.add(collapseAllAction); diff --git a/platform/platform-resources/src/META-INF/XmlPlugin.xml b/platform/platform-resources/src/META-INF/XmlPlugin.xml index c39432bffaed..8a997f8703d0 100644 --- a/platform/platform-resources/src/META-INF/XmlPlugin.xml +++ b/platform/platform-resources/src/META-INF/XmlPlugin.xml @@ -311,7 +311,7 @@ - + diff --git a/plugins/groovy/src/org/jetbrains/plugins/groovy/refactoring/convertToJava/ExpressionGenerator.java b/plugins/groovy/src/org/jetbrains/plugins/groovy/refactoring/convertToJava/ExpressionGenerator.java index 82037294d532..98e2de75d35d 100644 --- a/plugins/groovy/src/org/jetbrains/plugins/groovy/refactoring/convertToJava/ExpressionGenerator.java +++ b/plugins/groovy/src/org/jetbrains/plugins/groovy/refactoring/convertToJava/ExpressionGenerator.java @@ -73,6 +73,7 @@ import org.jetbrains.plugins.groovy.lang.psi.impl.synthetic.ClosureSyntheticPara import org.jetbrains.plugins.groovy.lang.psi.impl.synthetic.GrLightLocalVariable; import org.jetbrains.plugins.groovy.lang.psi.impl.synthetic.GroovyScriptClass; import org.jetbrains.plugins.groovy.lang.psi.typeEnhancers.ClosureParameterEnhancer; +import org.jetbrains.plugins.groovy.lang.psi.util.GrStringUtil; import org.jetbrains.plugins.groovy.lang.psi.util.GroovyCommonClassNames; import org.jetbrains.plugins.groovy.lang.psi.util.GroovyPropertyUtils; import org.jetbrains.plugins.groovy.lang.psi.util.PsiUtil; @@ -896,32 +897,37 @@ public class ExpressionGenerator extends Generator { public void visitLiteralExpression(GrLiteral literal) { final TypeConstraint[] constraints = GroovyExpectedTypesProvider.calculateTypeConstraints(literal); - final String text = literal.getText(); - final Object value; - if (text.startsWith("'''") || text.startsWith("\"\"\"")) { - String string = ((String)literal.getValue()); - LOG.assertTrue(string != null); - string = string.replace("\n", "\\n").replace("\r", "\\r"); - value = string; - } - else { - value = literal.getValue(); - } - boolean isChar = false; for (TypeConstraint constraint : constraints) { if (constraint instanceof SubtypeConstraint && TypesUtil.unboxPrimitiveTypeWrapper(constraint.getDefaultType()) == PsiType.CHAR) { isChar = true; } } - if (isChar) { - builder.append('\'').append(StringUtil.escapeQuotes(String.valueOf(value))).append('\''); + + final String text = literal.getText(); + final Object value; + if (text.startsWith("'''") || text.startsWith("\"\"\"")) { + String string = GrStringUtil.removeQuotes(text).replace("\n", "\\n").replace("\r", "\\r"); + builder.append('"').append(string).append('"'); } - else if (value instanceof String) { - builder.append('"').append(StringUtil.escapeQuotes((String)value)).append('"'); + else if (text.startsWith("'")) { + if (isChar) { + builder.append(text); + } + else { + builder.append('"').append(StringUtil.escapeQuotes(StringUtil.trimEnd(text.substring(1, text.length()), "'"))).append('"'); + } + } + else if (text.startsWith("\"")) { + if (isChar) { + builder.append('\'').append(StringUtil.escapeQuotes(StringUtil.trimEnd(text.substring(1, text.length()), "\""))).append('\''); + } + else { + builder.append(text); + } } else { - builder.append(value); + builder.append(text); } } diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/convertToJava/CodeBlockGenerationTest.groovy b/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/convertToJava/CodeBlockGenerationTest.groovy index 897d1d4bb004..ac034e12badf 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/convertToJava/CodeBlockGenerationTest.groovy +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/refactoring/convertToJava/CodeBlockGenerationTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * 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. @@ -189,4 +189,6 @@ public final class Matcher { void testSelfNavigatingOperator() { doTest() } void testComparisonToNull() { doTest() } + + void testStringConverting() { doTest() } } diff --git a/plugins/groovy/testdata/refactoring/convertGroovyToJava/codeBlock/stringConverting.groovy b/plugins/groovy/testdata/refactoring/convertGroovyToJava/codeBlock/stringConverting.groovy new file mode 100644 index 000000000000..e70d8c606eb8 --- /dev/null +++ b/plugins/groovy/testdata/refactoring/convertGroovyToJava/codeBlock/stringConverting.groovy @@ -0,0 +1,12 @@ +print("a"); +print("v"); +char a = 'a'; +java.lang.String s = "b"; +java.lang.String x = "ab"; +print("a\t\nabc"); +print("a'b\tc"); +print("a\"b\tc"); +print(4); +print(4.5f); +print(4.5d); +print(-4.5d); diff --git a/plugins/groovy/testdata/refactoring/convertGroovyToJava/codeBlock/stringConverting.java b/plugins/groovy/testdata/refactoring/convertGroovyToJava/codeBlock/stringConverting.java new file mode 100644 index 000000000000..e70d8c606eb8 --- /dev/null +++ b/plugins/groovy/testdata/refactoring/convertGroovyToJava/codeBlock/stringConverting.java @@ -0,0 +1,12 @@ +print("a"); +print("v"); +char a = 'a'; +java.lang.String s = "b"; +java.lang.String x = "ab"; +print("a\t\nabc"); +print("a'b\tc"); +print("a\"b\tc"); +print(4); +print(4.5f); +print(4.5d); +print(-4.5d); diff --git a/plugins/groovy/testdata/refactoring/convertGroovyToJava/codeBlock/switch3.java b/plugins/groovy/testdata/refactoring/convertGroovyToJava/codeBlock/switch3.java index b3e0f58ec920..b9bf0f879210 100644 --- a/plugins/groovy/testdata/refactoring/convertGroovyToJava/codeBlock/switch3.java +++ b/plugins/groovy/testdata/refactoring/convertGroovyToJava/codeBlock/switch3.java @@ -1,4 +1,4 @@ -java.util.Date date = new java.util.Date(2011, 4, 9); +java.util.Date date = new java.util.Date(2011, 04, 09); if (org.codehaus.groovy.runtime.DefaultGroovyMethods.isCase(new java.util.Date(20, 11, 23), date)) { print("aaa"); print("bbb"); diff --git a/plugins/groovy/testdata/refactoring/convertGroovyToJava/codeBlock/switch4.java b/plugins/groovy/testdata/refactoring/convertGroovyToJava/codeBlock/switch4.java index f70673f58d36..86116da16b22 100644 --- a/plugins/groovy/testdata/refactoring/convertGroovyToJava/codeBlock/switch4.java +++ b/plugins/groovy/testdata/refactoring/convertGroovyToJava/codeBlock/switch4.java @@ -1,4 +1,4 @@ -java.util.Date date = new java.util.Date(2011, 4, 9); +java.util.Date date = new java.util.Date(2011, 04, 09); if (org.codehaus.groovy.runtime.DefaultGroovyMethods.isCase(new java.util.Date(20, 11, 23), date)) { print("aaa"); print("bbb"); diff --git a/plugins/javaFX/javaFX-CE/testSrc/org/jetbrains/plugins/javaFX/fxml/JavaFXRenameTest.java b/plugins/javaFX/javaFX-CE/testSrc/org/jetbrains/plugins/javaFX/fxml/JavaFXRenameTest.java index 7b5893da6b90..702f0aa0fbd5 100644 --- a/plugins/javaFX/javaFX-CE/testSrc/org/jetbrains/plugins/javaFX/fxml/JavaFXRenameTest.java +++ b/plugins/javaFX/javaFX-CE/testSrc/org/jetbrains/plugins/javaFX/fxml/JavaFXRenameTest.java @@ -18,6 +18,7 @@ package org.jetbrains.plugins.javaFX.fxml; import com.intellij.codeInsight.TargetElementUtilBase; import com.intellij.codeInsight.daemon.DaemonAnalyzerTestCase; import com.intellij.openapi.application.PluginPathManager; +import com.intellij.psi.PsiClass; import com.intellij.psi.PsiElement; import com.intellij.refactoring.rename.RenameProcessor; import com.intellij.refactoring.rename.inplace.MemberInplaceRenameHandler; @@ -51,7 +52,15 @@ public class JavaFXRenameTest extends DaemonAnalyzerTestCase { public void testCustomComponentTag() throws Exception { doTest("Foo", true); } - + + public void testFromReference() throws Exception { + final String newName = "lbl1"; + doTest(newName); + final PsiClass controllerClass = findClass(getTestName(false)); + assertNotNull(controllerClass); + assertNotNull(controllerClass.findFieldByName(newName, false)); + } + public void testIdWithRefs() throws Exception { configureByFiles(null, getTestName(true) + ".fxml"); PsiElement element = TargetElementUtilBase diff --git a/plugins/javaFX/src/META-INF/common-javaFX-plugin.xml b/plugins/javaFX/src/META-INF/common-javaFX-plugin.xml index ce37e7bf9534..ebe56efb50d1 100644 --- a/plugins/javaFX/src/META-INF/common-javaFX-plugin.xml +++ b/plugins/javaFX/src/META-INF/common-javaFX-plugin.xml @@ -42,6 +42,7 @@ + diff --git a/plugins/javaFX/src/org/jetbrains/plugins/javaFX/JavaFxIdsIndex.java b/plugins/javaFX/src/org/jetbrains/plugins/javaFX/JavaFxIdsIndex.java index ce51e924b6a6..3e4c63850118 100644 --- a/plugins/javaFX/src/org/jetbrains/plugins/javaFX/JavaFxIdsIndex.java +++ b/plugins/javaFX/src/org/jetbrains/plugins/javaFX/JavaFxIdsIndex.java @@ -74,10 +74,23 @@ public class JavaFxIdsIndex extends FileBasedIndexExtension> } @NotNull - public static Collection getAllRegisteredIds(Project project) { + public static Collection getAllRegisteredIds(Project project, Set fxmls) { CommonProcessors.CollectUniquesProcessor processor = new CommonProcessors.CollectUniquesProcessor(); FileBasedIndex.getInstance().processAllKeys(KEY, processor, project); - return processor.getResults(); + final Collection results = new ArrayList(processor.getResults()); + final GlobalSearchScope searchScope = GlobalSearchScope.projectScope(project); + for (Iterator iterator = results.iterator(); iterator.hasNext(); ) { + final String id = iterator.next(); + final List> values = FileBasedIndex.getInstance().getValues(KEY, id, searchScope); + if (!values.isEmpty()) { + final Set pathSet = values.get(0); + if (pathSet != null && !Collections.disjoint(pathSet, fxmls)) { + continue; + } + } + iterator.remove(); + } + return results; } @NotNull diff --git a/plugins/javaFX/src/org/jetbrains/plugins/javaFX/JavaFxRenameAttributeProcessor.java b/plugins/javaFX/src/org/jetbrains/plugins/javaFX/JavaFxRenameAttributeProcessor.java new file mode 100644 index 000000000000..fd9945ebec50 --- /dev/null +++ b/plugins/javaFX/src/org/jetbrains/plugins/javaFX/JavaFxRenameAttributeProcessor.java @@ -0,0 +1,58 @@ +/* + * 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 org.jetbrains.plugins.javaFX; + +import com.intellij.psi.PsiElement; +import com.intellij.psi.PsiField; +import com.intellij.psi.PsiReference; +import com.intellij.psi.search.SearchScope; +import com.intellij.psi.xml.XmlAttribute; +import com.intellij.psi.xml.XmlAttributeValue; +import com.intellij.refactoring.rename.RenameXmlAttributeProcessor; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.plugins.javaFX.fxml.FxmlConstants; +import org.jetbrains.plugins.javaFX.fxml.JavaFxFileTypeFactory; + +import java.util.Map; + +/** + * User: anna + * Date: 4/2/13 + */ +public class JavaFxRenameAttributeProcessor extends RenameXmlAttributeProcessor { + @Override + public boolean canProcessElement(@NotNull PsiElement element) { + if (element instanceof XmlAttributeValue && JavaFxFileTypeFactory.isFxml(element.getContainingFile())) { + final PsiElement parent = element.getParent(); + return parent instanceof XmlAttribute && FxmlConstants.FX_ID.equals(((XmlAttribute)parent).getName()); + } + return false; + } + + @Override + public void prepareRenaming(PsiElement element, String newName, Map allRenames, SearchScope scope) { + if (element instanceof XmlAttributeValue) { + final XmlAttributeValue refId = (XmlAttributeValue)element; + final PsiReference refIdReference = refId.getReference(); + if (refIdReference != null) { + final PsiElement resolveRefId = refIdReference.resolve(); + if (resolveRefId instanceof PsiField) { + allRenames.put(resolveRefId, newName); + } + } + } + } +} diff --git a/plugins/javaFX/testData/rename/FromReference.java b/plugins/javaFX/testData/rename/FromReference.java new file mode 100644 index 000000000000..63a025eec6d5 --- /dev/null +++ b/plugins/javaFX/testData/rename/FromReference.java @@ -0,0 +1,4 @@ +import javafx.control.Label; +public class FromReference { + public Label lb; +} \ No newline at end of file diff --git a/plugins/javaFX/testData/rename/fromReference.fxml b/plugins/javaFX/testData/rename/fromReference.fxml new file mode 100644 index 000000000000..0c7df76f5d20 --- /dev/null +++ b/plugins/javaFX/testData/rename/fromReference.fxml @@ -0,0 +1,8 @@ + + + + + + + \ No newline at end of file diff --git a/plugins/javaFX/testData/rename/fromReference_after.fxml b/plugins/javaFX/testData/rename/fromReference_after.fxml new file mode 100644 index 000000000000..4fa09b02606d --- /dev/null +++ b/plugins/javaFX/testData/rename/fromReference_after.fxml @@ -0,0 +1,8 @@ + + + + + + + \ No newline at end of file diff --git a/plugins/maven/src/main/java/org/jetbrains/idea/maven/dom/MavenDomProjectProcessorUtils.java b/plugins/maven/src/main/java/org/jetbrains/idea/maven/dom/MavenDomProjectProcessorUtils.java index a3b3cd35e410..246897a2cb53 100644 --- a/plugins/maven/src/main/java/org/jetbrains/idea/maven/dom/MavenDomProjectProcessorUtils.java +++ b/plugins/maven/src/main/java/org/jetbrains/idea/maven/dom/MavenDomProjectProcessorUtils.java @@ -315,27 +315,25 @@ public class MavenDomProjectProcessorUtils { SearchProcessor processor = new SearchProcessor() { @Override protected MavenDomDependency find(MavenDomDependencies mavenDomDependencies) { - if (!model.equals(mavenDomDependencies.getParentOfType(MavenDomProjectModel.class, true))) { - for (MavenDomDependency domDependency : mavenDomDependencies.getDependencies()) { - if (artifactId.equals(domDependency.getArtifactId().getStringValue()) && - groupId.equals(domDependency.getGroupId().getStringValue())) { - return domDependency; - } + for (MavenDomDependency domDependency : mavenDomDependencies.getDependencies()) { + if (artifactId.equals(domDependency.getArtifactId().getStringValue()) && + groupId.equals(domDependency.getGroupId().getStringValue())) { + return domDependency; + } - if ("import".equals(domDependency.getScope().getRawText())) { - GenericDomValue version = domDependency.getVersion(); - if (version.getXmlElement() != null) { - GenericDomValueReference reference = new GenericDomValueReference(version); - PsiElement resolve = reference.resolve(); + if ("import".equals(domDependency.getScope().getRawText())) { + GenericDomValue version = domDependency.getVersion(); + if (version.getXmlElement() != null) { + GenericDomValueReference reference = new GenericDomValueReference(version); + PsiElement resolve = reference.resolve(); - if (resolve instanceof XmlFile) { - MavenDomProjectModel dependModel = MavenDomUtil.getMavenDomModel((PsiFile)resolve, MavenDomProjectModel.class); - if (dependModel != null) { - for (MavenDomDependency dep : dependModel.getDependencyManagement().getDependencies().getDependencies()) { - if (artifactId.equals(dep.getArtifactId().getStringValue()) && - groupId.equals(dep.getGroupId().getStringValue())) { - return domDependency; - } + if (resolve instanceof XmlFile) { + MavenDomProjectModel dependModel = MavenDomUtil.getMavenDomModel((PsiFile)resolve, MavenDomProjectModel.class); + if (dependModel != null) { + for (MavenDomDependency dep : dependModel.getDependencyManagement().getDependencies().getDependencies()) { + if (artifactId.equals(dep.getArtifactId().getStringValue()) && + groupId.equals(dep.getGroupId().getStringValue())) { + return domDependency; } } } diff --git a/resources-en/src/tips/SelectTasks.html b/resources-en/src/tips/SelectTasks.html new file mode 100644 index 000000000000..ad431a0be71b --- /dev/null +++ b/resources-en/src/tips/SelectTasks.html @@ -0,0 +1,15 @@ + + + + + + +

When working with a lengthy list of tasks, you don't need to delete them one by one. +Select several tasks, using Shift +or Control keys, click the right arrow, and then click +Remove. +

+

+ + + diff --git a/resources-en/src/tips/ShowAppliedStyles.html b/resources-en/src/tips/ShowAppliedStyles.html new file mode 100644 index 000000000000..7418eacc97a9 --- /dev/null +++ b/resources-en/src/tips/ShowAppliedStyles.html @@ -0,0 +1,16 @@ + + + + + + + +

You can quickly review all styles currently applied to an HTML tag, by right-clicking the tag name and selecting + Show Applied Styles For Tag + from the context menu:

+

+ + + + + diff --git a/resources-en/src/tips/images/hierarchy_browser.gif b/resources-en/src/tips/images/hierarchy_browser.gif index 10c37fa747e6..12cd66595aab 100644 Binary files a/resources-en/src/tips/images/hierarchy_browser.gif and b/resources-en/src/tips/images/hierarchy_browser.gif differ diff --git a/resources-en/src/tips/images/issueNavigation.png b/resources-en/src/tips/images/issueNavigation.png new file mode 100644 index 000000000000..adca4befad27 Binary files /dev/null and b/resources-en/src/tips/images/issueNavigation.png differ diff --git a/resources-en/src/tips/images/issueNavigation1.png b/resources-en/src/tips/images/issueNavigation1.png new file mode 100644 index 000000000000..f6df06364c37 Binary files /dev/null and b/resources-en/src/tips/images/issueNavigation1.png differ diff --git a/resources-en/src/tips/images/show_applied_styles.gif b/resources-en/src/tips/images/show_applied_styles.gif new file mode 100644 index 000000000000..3f1e4e809d1d Binary files /dev/null and b/resources-en/src/tips/images/show_applied_styles.gif differ diff --git a/resources-en/src/tips/tips.xml b/resources-en/src/tips/tips.xml index 7ec9c5674ff4..31e7da271e5c 100644 --- a/resources-en/src/tips/tips.xml +++ b/resources-en/src/tips/tips.xml @@ -159,4 +159,6 @@ + +