Merge remote-tracking branch 'origin/master'

This commit is contained in:
Vassiliy Kudryashov
2013-02-27 22:52:27 +04:00
15 changed files with 26 additions and 4 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 379 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 650 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 652 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 384 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 544 B

After

Width:  |  Height:  |  Size: 249 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 620 B

@@ -337,7 +337,7 @@ public class SingleInspectionProfilePanel extends JPanel {
actions.add(actionManager.createCollapseAllAction(myTreeExpander, myTree));
actions.add(new AnAction(CommonBundle.message("button.reset.to.default"), CommonBundle.message("button.reset.to.default"),
AllIcons.Actions.Reset_to_default) {
AllIcons.General.Reset) {
{
registerCustomShortcutSet(new CustomShortcutSet(KeyStroke.getKeyStroke(KeyEvent.VK_R, InputEvent.CTRL_MASK)), myTree);
}
@@ -353,7 +353,7 @@ public class SingleInspectionProfilePanel extends JPanel {
}
});
actions.add(new AnAction("Reset to Empty", "Reset to empty", AllIcons.General.Reset){
actions.add(new AnAction("Reset to Empty", "Reset to empty", AllIcons.Actions.Reset_to_empty){
@Override
public void update(AnActionEvent e) {
@@ -122,6 +122,7 @@ public class AllIcons {
public static final Icon Rerun = IconLoader.getIcon("/actions/rerun.png"); // 16x16
public static final Icon Reset_to_default = IconLoader.getIcon("/actions/reset-to-default.png"); // 16x16
public static final Icon Reset = IconLoader.getIcon("/actions/reset.png"); // 16x16
public static final Icon Reset_to_empty = IconLoader.getIcon("/actions/Reset_to_empty.png"); // 16x16
public static final Icon Restart = IconLoader.getIcon("/actions/restart.png"); // 16x16
public static final Icon Resume = IconLoader.getIcon("/actions/resume.png"); // 16x16
public static final Icon Right = IconLoader.getIcon("/actions/right.png"); // 16x16
@@ -93,6 +93,11 @@ public class JavaFXHighlightingTest extends DaemonAnalyzerTestCase {
doDoTest(false, false);
}
public void testNoParamsHandler() throws Exception {
configureByFiles(null, getTestName(true) + ".fxml", getTestName(false) + ".java");
doDoTest(false, false);
}
private void doTestIdController() throws Exception {
final String controllerClassName = getTestName(false) + "Controller";
configureByFiles(null, getTestName(true) + ".fxml", controllerClassName + ".java");
@@ -17,18 +17,22 @@ package org.jetbrains.plugins.javaFX.fxml.codeInsight.inspections;
import com.intellij.codeInspection.LocalQuickFix;
import com.intellij.codeInspection.ProblemDescriptor;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.project.Project;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiFile;
import com.intellij.psi.codeStyle.CodeStyleManager;
import com.intellij.psi.util.PsiTreeUtil;
import com.intellij.psi.xml.XmlTag;
import com.intellij.psi.xml.XmlTagChild;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.plugins.javaFX.fxml.JavaFxFileTypeFactory;
/**
* User: anna
*/
public class UnwrapTagFix implements LocalQuickFix {
private static final Logger LOG = Logger.getInstance("#" + UnwrapTagFix.class.getName());
private final String myTagName;
public UnwrapTagFix(String tagName) {
@@ -51,6 +55,8 @@ public class UnwrapTagFix implements LocalQuickFix {
public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {
final PsiElement element = descriptor.getPsiElement();
if (element != null) {
final PsiFile containingFile = element.getContainingFile();
LOG.assertTrue(containingFile != null && JavaFxFileTypeFactory.isFxml(containingFile), containingFile == null ? "no containing file found" : "containing file: " + containingFile.getName());
final XmlTag xmlTag = PsiTreeUtil.getParentOfType(element, XmlTag.class);
if (xmlTag != null) {
final XmlTag parentTag = xmlTag.getParentTag();
@@ -79,6 +79,7 @@ public class JavaFxEventHandlerReference extends PsiReferenceBase<XmlAttributeVa
return true;
}
}
return parameters.length == 0;
}
return false;
}
@@ -0,0 +1,4 @@
public class Controller {
public void sayHelloWorld() {
}
}
@@ -0,0 +1,5 @@
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.GridPane?>
<GridPane xmlns:fx="http://javafx.com/fxml" fx:controller="Controller">
<Button onAction="#sayHelloWorld"/>
</GridPane>
@@ -150,7 +150,7 @@ public class GroupByWordPrefixes implements Grouper, Sorter {
public ActionPresentation getPresentation() {
return new ActionPresentationData(PropertiesBundle.message("structure.view.group.by.prefixes.action.name"),
PropertiesBundle.message("structure.view.group.by.prefixes.action.description"),
AllIcons.Actions.FileStatus);
AllIcons.Actions.GroupByPrefix);
}
@NotNull
@@ -36,7 +36,7 @@ public class RestoreDefault extends AnAction implements IPropertyTableAction {
String text = DesignerBundle.message("designer.properties.restore_default");
presentation.setText(text);
presentation.setDescription(text);
presentation.setIcon(AllIcons.Actions.Reset_to_default);
presentation.setIcon(AllIcons.General.Reset);
}
@Override